TODO

  • update prior in this file and the other to match prior justification
  • prevalence-and-trend plot might need to choose between marginal and conditional means. perhaps component plots too.
  • try to reproduce “” warning/error in prevalence-and-trend plots and fix
  • Add an (alternative) weighted model that weights by total articles published in each journal during that year? This should only produce results for the field as a whole, eg “Psychology (weighted by publications per journal per year)”
  • remove/refactor plotting of summary data in plots, as the real data will be planned-missing
library(dplyr)
library(tidyr)
library(tibble)
library(stringr)
library(forcats)
library(readxl)
library(purrr)
library(readr)
library(janitor)
library(ggplot2)
library(scales)
library(ggstance)
library(ggcorrplot)
library(brms)
library(tidybayes)
library(emmeans)
library(marginaleffects)
library(knitr)
library(kableExtra)


dir.create("models")
dir.create("plots")

# function to save ggplots to disk
quicksave <- function(name, width, height){
  ggsave(paste0("plots/", name, ".pdf"), 
         device = "pdf",
         width = width, 
         height = height)
  
  ggsave(paste0("plots/", name, ".png"), 
         device = "png",
         dpi = 600,
         width = width, 
         height = height)
}

# round using half-up strategy and retaining trailing zeros
rnd <- function(x, digits = 2) {
  rounded_number <- round_half_up(x, digits)
  formatted_number <- sprintf(paste0("%.", digits, "f"), rounded_number)
  return(formatted_number)
}

Data

Simulate data

We will have two raters and they can either (a) score each article so that each one is scored twice, or (b) they could overlap eg 10% of articles for double scoring, so that more articles can be scored in total. Any input on this?

Each rater will score each measurement type as either present (1) or absent (0) in that article. There are 6 measurement types according to our scoring, and we see these categories as exhaustive. There will probably be 6 subfields and 5 journals per subfield.

In the case of disagreements, should we solve this in data processing (get agreement between the authors/round down/round up) or model it?

The total number of articles to be scored is still to be determined, as we don’t know the average extraction time or the total resources available to us here (1 or 2 RAs or masters students or a mix).

When a journal has not existed for all years in the range, should we still extract the same number of articles from the years that do exist, or should we extract a proportionate number of articles (so the articles per year is stable)?

set.seed(42)

n_articles_per_journal <- 15 # current estimate
n_journals_per_subfield <- 5
n_subfields <- 6

n_articles_total <- n_articles_per_journal * n_journals_per_subfield * n_subfields

data_simulated <-
  tibble(
    article_id = seq(from = 1, 
                     to = n_articles_total, 
                     by = 1),
    year = sample(x = 2009:2023,  # year range 
                  size = n_articles_total, 
                  replace = TRUE),
    directbehavioral = rbinom(n = n_articles_total,
                              size = 1, # values between 0 and 1
                              prob = .05), # probability of a given study containing such a measure
    behavioralproxy = rbinom(n = n_articles_total,
                             size = 1, # values between 0 and 1
                             prob = .1), # probability of a given study containing such a measure
    selfreportsaboutbehavior = rbinom(n = n_articles_total,
                                      size = 1, # values between 0 and 1
                                      prob = .1), # probability of a given study containing such a measure
    selfreportaboutsubjectivestate = c(rbinom(n = n_articles_total/2,
                          size = 1, # values between 0 and 1
                          prob = .95), # probability of a given study containing such a measure
                   rbinom(n = n_articles_total/2,
                          size = 1, # values between 0 and 1
                          prob = .70)),
    neurobiopsychophys = rbinom(n = n_articles_total,
                       size = 1, # values between 0 and 1
                       prob = .1), # probability of a given study containing such a measure
    cognitiveability = rbinom(n = n_articles_total,
                              size = 1, # values between 0 and 1
                              prob = .1) # probability of a given study containing such a measure
  ) |>
  mutate(article_id = as.factor(paste0("doi_", article_id)),
         subfield = c(rep("General", n_articles_per_journal * n_journals_per_subfield),
                      rep("Cognitive", n_articles_per_journal * n_journals_per_subfield),
                      rep("Clinical", n_articles_per_journal * n_journals_per_subfield),
                      rep("Developmental", n_articles_per_journal * n_journals_per_subfield),
                      rep("Industrial & Organizational", n_articles_per_journal * n_journals_per_subfield),
                      rep("Social & Personality", n_articles_per_journal * n_journals_per_subfield)),
         subfield = as.factor(subfield),
         journal_label = paste(subfield, "journal", seq(from = 1, to = 5)))

# weights
data_weights <- data_simulated |>
  distinct(subfield, journal_label) |>
  mutate(total_articles = round(runif(n = n(), min = 10*4, max = 10*12), 0),
         total_articles = case_when(subfield == "General" ~ total_articles + 80,
                                    subfield == "Clinical" ~ total_articles + 40,
                                    TRUE ~ total_articles),
         percent_of_all_articles = total_articles/sum(total_articles)*100)

data_simulated <- data_simulated |>
  left_join(data_weights, by = c("subfield", "journal_label"))

journal_names <- read_xlsx("../../data/registered report/journals.xlsx")

data_simulated <- data_simulated |>
  left_join(journal_names, by = c("subfield", "journal_label")) |>
  rename(journal = journal_abbreviation)

# save for reproducibility
if(!file.exists("../../data/registered report/simulated/data_simulated.csv")){
  write_csv(data_simulated, "../../data/registered report/simulated/data_simulated.csv")
}

# pull the journal abbreviations, for ordering figures and tables later
subfield_and_journal_labels <- journal_names |>
  pull(journal_abbreviation)

subfield_and_journal_labels_without_subfields <- journal_names |>
  drop_na(journal_name) |>
  pull(journal_abbreviation)

Check

data_simulated |>
  count(subfield, journal) |>
  kable() |>
  kable_classic(full_width = FALSE)
subfield journal n
Clinical BRAT 15
Clinical CPS 15
Clinical JCCAP 15
Clinical JCCP 15
Clinical JPCS 15
Cognitive Cognition 15
Cognitive JEP:HPP 15
Cognitive JEP:LMC 15
Cognitive JML 15
Cognitive M&C 15
Developmental CD 15
Developmental DP 15
Developmental JECP 15
Developmental JRA 15
Developmental PA 15
General Collabra 15
General JEP:G 15
General NHB 15
General PLOSONE 15
General PS 15
Industrial & Organizational JAP 15
Industrial & Organizational JEP:A 15
Industrial & Organizational JOB 15
Industrial & Organizational OBHDP 15
Industrial & Organizational PP 15
Social & Personality Emotion 15
Social & Personality JESP 15
Social & Personality JPSP 15
Social & Personality JRP 15
Social & Personality PSPB 15
data_simulated |>
  summarize(mean_directbehavioral = mean(directbehavioral),
            mean_behavioralproxy = mean(behavioralproxy),
            mean_selfreportsaboutbehavior = mean(selfreportsaboutbehavior),
            mean_selfreportaboutsubjectivestate = mean(selfreportaboutsubjectivestate),
            mean_neurobiopsychophys = mean(neurobiopsychophys),
            mean_cognitiveability = mean(cognitiveability)) |>
  mutate_all(round_half_up, digits = 3) |>
  kable() |>
  kable_classic(full_width = FALSE)
mean_directbehavioral mean_behavioralproxy mean_selfreportsaboutbehavior mean_selfreportaboutsubjectivestate mean_neurobiopsychophys mean_cognitiveability
0.04 0.089 0.107 0.833 0.122 0.078
data_simulated |>
  group_by(subfield, journal) |>
  summarize(mean_directbehavioral = mean(directbehavioral),
            mean_behavioralproxy = mean(behavioralproxy),
            mean_selfreportsaboutbehavior = mean(selfreportsaboutbehavior),
            mean_selfreportaboutsubjectivestate = mean(selfreportaboutsubjectivestate),
            mean_neurobiopsychophys = mean(neurobiopsychophys),
            mean_cognitiveability = mean(cognitiveability)) |>
  mutate_if(is.numeric, round_half_up, digits = 3) |>
  kable() |>
  kable_classic(full_width = FALSE)
subfield journal mean_directbehavioral mean_behavioralproxy mean_selfreportsaboutbehavior mean_selfreportaboutsubjectivestate mean_neurobiopsychophys mean_cognitiveability
Clinical BRAT 0.067 0.333 0.133 0.933 0.200 0.000
Clinical CPS 0.000 0.067 0.067 1.000 0.200 0.133
Clinical JCCAP 0.133 0.133 0.067 1.000 0.067 0.067
Clinical JCCP 0.000 0.067 0.000 0.733 0.067 0.067
Clinical JPCS 0.000 0.067 0.133 0.933 0.067 0.133
Cognitive Cognition 0.067 0.067 0.133 0.933 0.000 0.067
Cognitive JEP:HPP 0.133 0.000 0.133 0.867 0.067 0.067
Cognitive JEP:LMC 0.067 0.133 0.067 0.933 0.067 0.000
Cognitive JML 0.000 0.067 0.133 0.933 0.133 0.133
Cognitive M&C 0.000 0.133 0.133 0.933 0.267 0.067
Developmental CD 0.067 0.067 0.200 0.800 0.067 0.067
Developmental DP 0.067 0.133 0.200 0.800 0.133 0.000
Developmental JECP 0.067 0.000 0.200 0.733 0.000 0.067
Developmental JRA 0.000 0.200 0.200 0.800 0.200 0.133
Developmental PA 0.067 0.200 0.000 0.667 0.067 0.067
General Collabra 0.067 0.133 0.067 1.000 0.267 0.067
General JEP:G 0.000 0.133 0.267 1.000 0.200 0.067
General NHB 0.067 0.067 0.000 0.867 0.133 0.067
General PLOSONE 0.000 0.000 0.067 0.933 0.200 0.133
General PS 0.067 0.067 0.067 1.000 0.067 0.000
Industrial & Organizational JAP 0.000 0.000 0.000 0.800 0.067 0.200
Industrial & Organizational JEP:A 0.000 0.000 0.067 0.733 0.200 0.133
Industrial & Organizational JOB 0.000 0.133 0.067 0.600 0.133 0.000
Industrial & Organizational OBHDP 0.067 0.133 0.067 0.867 0.067 0.067
Industrial & Organizational PP 0.067 0.000 0.000 0.533 0.200 0.067
Social & Personality Emotion 0.067 0.067 0.067 0.533 0.000 0.267
Social & Personality JESP 0.000 0.000 0.133 0.800 0.000 0.000
Social & Personality JPSP 0.000 0.267 0.267 0.667 0.067 0.000
Social & Personality JRP 0.000 0.000 0.133 0.733 0.267 0.067
Social & Personality PSPB 0.067 0.000 0.133 0.933 0.200 0.133

Real data

# simulated data will be replaced with real data after collection
# data_processed <- read_csv("../../data/processed/data_processed.csv")

Analyze

Justification of priors

Intuitions for log-odds

We employ a logistic regression (Bernoulli link function), so priors for the intercepts, b_year_centered, and sd of the random effects are on the log-odds scale.

To illustrate and develop an intuition for log-odds values, we can convert probabilities to log-odds and table/plot them against one another.

df_probability_logodds <- 
  tibble(probability = seq(0, 1, by = 0.001)) |>
  mutate(logodds = qlogis(probability))

df_probability_logodds |>
  filter(probability %in% c(0.01, 0.5, 0.99)) |>
  kable() |>
  kable_classic(full_width = FALSE)
probability logodds
0.01 -4.59512
0.50 0.00000
0.99 4.59512
ggplot(df_probability_logodds, aes(probability, logodds)) +
  geom_point(size = 0.1) +
  geom_vline(xintercept = 0.01, linetype = "dashed", color = "#359EAAFF") +
  geom_vline(xintercept = 0.99, linetype = "dashed", color = "#359EAAFF") +
  theme_linedraw() +
  scale_x_continuous(breaks = breaks_pretty(n = 10)) +
  xlab("Probability") +
  ylab("Log-odds")

This shows that a probability of 50% = log-odds of 0. More importantly, |log-odds| > 4.6 refer to probabilities of less than 1%. So, to say that there is a log-odds ±5, 6, or 7 of something occurring means that it almost never/always occurs. For our study, prevalences in the 1-99% range are reasonable.

Intercepts (prevalences)

We are looking to employ weakly regularizing priors, i.e., those that help the model converge, and therefore exclude impossible/highly implausible values, without imposing strong prior beliefs onto the model. Given this goal, our priors should therefore both cover the probability of 1-99% range (and a bit beyond) and exclude probabilities that approach ±Inf, therefore |log-odds| of ±4.6 or so. A normally distributed prior on the log-odds scale is therefore useful here.

We will choose specific locations based our a priori beliefs about the prevalence of different types of measures. However, given the width of the prior on each, this won’t make much difference. It’s more about indicating to the model what is unlikely (e.g., only 1% of studies using self-report measures) rather than a strong belief about what is likely.

Specifically, we choose three different priors depending on our beliefs about each type of measure:

  • No strong beliefs about prevalence: mean = .50 (on probability scale), sd = 1.4 (on log-odds scale). This prior serves only to specify that very high or low prevalences are less likely.
  • Prior belief prevalence is high: mean = .70 (on probability scale), sd = 1 (on log-odds scale). This prior serves to specify that low prevalences less likely.
  • Prior belief prevalence is low: mean = .25 (on probability scale), sd = 1 (on log-odds scale). This prior serves to specify that high prevalences less likely.

The asymmetry between low and high is intentional, reflecting our stronger belief that low prevalences are lower than high prevalence are high.

illustrate_intercept_prior <- function(mean_prob, sd_logodds){
  df_normal_logodds <- 
    tibble(logodds = rnorm(mean = qlogis(mean_prob), sd = sd_logodds, n = 10000000)) |>
    mutate(probability = plogis(logodds))
  
  ggplot(df_normal_logodds, aes(probability)) +
    geom_density(fill = "grey20") +
    theme_linedraw() +
    scale_x_continuous(breaks = breaks_pretty(n = 10)) +
    xlab("Probability") +
    ylab("Density") +
    ggtitle(paste0("Prevalence prior: \nnormal(M = qlogis(", mean_prob, "), SD = 1) log-odds distribution converted to probabilities"))
}

illustrate_intercept_prior(mean_prob = .70, sd_logodds = 1) # self reports of subjective experience

illustrate_intercept_prior(mean_prob = .25, sd_logodds = 1) # direct behavioral measures

illustrate_intercept_prior(mean_prob = .50, sd_logodds = 1.4) # all other modes, given our very weak beliefs and the potential for variation between subfields/journals 

qlogis(.50)
## [1] 0
qlogis(.70)
## [1] 0.8472979
qlogis(.25)
## [1] -1.098612

SD of the random effects

The width of the SDs on the random effects (subfield and subfield:journal) also require a prior, still on the log-odds scale, which refers to the degree of variability between subfields/journals.

McElreath uses exponential(1) as a weakly regularizing prior for SDs on random effects frequently in the 2nd edition of Statistical Rethinking, and therefore we do here. Again, this serves to exclude truly impossible or highly implausible values (e.g., 10 or 100) to aid convergence, rather than to assert strong prior beliefs. The below plots such an exp(1) distribution.

prior_sd <- tibble(sd = seq(0, 4, by = 0.1)) |>
  mutate(density = dexp(sd, rate = 1))  

ggplot(prior_sd, aes(sd, density)) +
  geom_area() +
  xlab("SD of the random effects (on the log-odds scale)") +
  ylab("Density") +
  theme_linedraw()

Correlations among the random effects

{brms} uses a Lewandowski-Kurowicka-Joe (LKJ) prior with eta = 1, i.e., a flat distribution. LKJ depends on the number of correlations involved, and we have a relatively large amount (21), so values of eta above 1, which would regularize correlations towards zero, would be more aggressive than the weakly regularising prior that we’re looking for. LKJ(1) is merely skeptical of large correlations, but is applied to the matrix as a whole, so a minority of large correlations are still possible with this prior. We therefore retain the {brms} default prior of lkj(1).

Fit model

# # real data
# data_centered <- data_processed |>
#   mutate(year_centered = year - 2016)

# simulated data for development
data_centered <- data_simulated |>
  mutate(year_centered = year - 2016)

# specify Wilkinson notation for the model
# note that the | p | and | q | syntax specifies that the correlations among the random effects be modelled (ie not assumed to be zero)
formulas <- 
  bf(formula = directbehavioral | weights(percent_of_all_articles) ~               1 + year_centered + (1 + year_centered | p | subfield) + (1 + year_centered | q | subfield:journal)) +
  bf(formula = behavioralproxy | weights(percent_of_all_articles) ~                1 + year_centered + (1 + year_centered | p | subfield) + (1 + year_centered | q | subfield:journal)) +
  bf(formula = selfreportsaboutbehavior | weights(percent_of_all_articles) ~       1 + year_centered + (1 + year_centered | p | subfield) + (1 + year_centered | q | subfield:journal)) +
  bf(formula = selfreportaboutsubjectivestate | weights(percent_of_all_articles) ~ 1 + year_centered + (1 + year_centered | p | subfield) + (1 + year_centered | q | subfield:journal)) +
  bf(formula = neurobiopsychophys | weights(percent_of_all_articles) ~             1 + year_centered + (1 + year_centered | p | subfield) + (1 + year_centered | q | subfield:journal)) +
  bf(formula = cognitiveability | weights(percent_of_all_articles) ~               1 + year_centered + (1 + year_centered | p | subfield) + (1 + year_centered | q | subfield:journal))

# # it is plausible that a reviewer asks us for unweighted models for robustness, although it is harder to know how to interpret the field-wide prevalences and trends given meaningful differences in size of the subfields. nonetheless, I retain the code here.
# formulas <- 
#   bf(formula = directbehavioral ~               1 + year_centered + (1 + year_centered | p | subfield) + (1 + year_centered | q | subfield:journal)) +
#   bf(formula = behavioralproxy ~                1 + year_centered + (1 + year_centered | p | subfield) + (1 + year_centered | q | subfield:journal)) +
#   bf(formula = selfreportsaboutbehavior ~       1 + year_centered + (1 + year_centered | p | subfield) + (1 + year_centered | q | subfield:journal)) +
#   bf(formula = selfreportaboutsubjectivestate ~ 1 + year_centered + (1 + year_centered | p | subfield) + (1 + year_centered | q | subfield:journal)) +
#   bf(formula = neurobiopsychophys ~             1 + year_centered + (1 + year_centered | p | subfield) + (1 + year_centered | q | subfield:journal)) +
#   bf(formula = cognitiveability ~               1 + year_centered + (1 + year_centered | p | subfield) + (1 + year_centered | q | subfield:journal)) 

# specify priors
priors <- 
  prior(normal(-1.10, 1.0), class = Intercept, resp = "directbehavioral") + # qlogis(.25)
  prior(normal(+0.00, 1.4), class = Intercept, resp = "behavioralproxy") + # qlogis(.50)
  prior(normal(+0.00, 1.4), class = Intercept, resp = "selfreportsaboutbehavior") + # qlogis(.50)
  prior(normal(+0.85, 1.0), class = Intercept, resp = "selfreportaboutsubjectivestate") + # qlogis(.70)
  prior(normal(+0.00, 1.4), class = Intercept, resp = "neurobiopsychophys") + # qlogis(.50)
  prior(normal(+0.00, 1.4), class = Intercept, resp = "cognitiveability") + # qlogis(.50)
  
  prior(normal(0, 0.2),   class = b,         resp = "directbehavioral") +
  prior(normal(0, 0.2),   class = b,         resp = "behavioralproxy") + 
  prior(normal(0, 0.2),   class = b,         resp = "selfreportsaboutbehavior") + 
  prior(normal(0, 0.2),   class = b,         resp = "selfreportaboutsubjectivestate") + 
  prior(normal(0, 0.2),   class = b,         resp = "neurobiopsychophys") + 
  prior(normal(0, 0.2),   class = b,         resp = "cognitiveability") + 
  
  prior(exponential(1),   class = sd,        resp = "directbehavioral") +
  prior(exponential(1),   class = sd,        resp = "behavioralproxy") + 
  prior(exponential(1),   class = sd,        resp = "selfreportsaboutbehavior") + 
  prior(exponential(1),   class = sd,        resp = "selfreportaboutsubjectivestate") + 
  prior(exponential(1),   class = sd,        resp = "neurobiopsychophys") + 
  prior(exponential(1),   class = sd,        resp = "cognitiveability") + 
  
  prior(lkj_corr_cholesky(1), class = cor)

# fit model
fitted_model <- brm(
  formula = formulas,
  family  = bernoulli(link = "logit"),
  prior   = priors,
  data    = data_centered,
  cores   = parallel::detectCores(),
  seed    = 42,
  iter    = 8000, 
  warmup  = 4000, 
  
  # sample prior only for testing and dev
  #sample_prior = "only",
  #file = "models/fitted_model_prioronly"
  
  # fit using simulated data for testing and dev
  sample_prior = "no",
  file = "models/fitted_model_simulated_data"
  
  # when real data is in after Stage 1 acceptance, fit using real data
  #sample_prior = "no",
  #file = "models/fitted_model"
  
  # if there are divergent transitions, can be increased from the default to eg .99 
  #control = list(adapt_delta = .99)
)

Model diagnostics

Extract estimates

Resources

For consistent and precise terminology, we relied on Heiss (2021) and Heiss (2022) which describe marginal vs conditional effects implemented in the marginaleffects vs emmeans packages.

Following Heiss’s (2021, 2022) terminology, we extract:

  • Marginal Global Mean (aka the Average Marginal Effect, AME): “typically, psychology articles…” - intervals are akin to confidence intervals in Frequentist meta analysis
  • Conditional Global Mean (aka the Group Average Marginal Effect, G-AME)): “a typical psychology article…” - intervals are akin to prediction intervals in Frequentist meta analysis, will be equal or wider than the AME estimates.
  • Conditional Mean by Subfield
  • Conditional Mean by Journal

Prevalence

if(exists("models/posterior_prevalence.rds")){
  posterior_prevalence <- read_rds("models/posterior_prevalence.rds")
} else {
  
  est_prevalence <- function(subfield = "hypothetical typical subfield", journal = "hypothetical typical journal", type = c("conditional", "marginal"), year_centered = 0, fit) {
    
    # reminder of the distinction: 
    # "a typical journal..." (conditional effect, taking levels of the random effects into account, whether existing or new hypothetical ones) vs.
    # "typically, journals..." (marginal effect, ignoring the random effects, therefore likely producing wider estimates given any heterogeneity among the random effects)
    
    if(type == "conditional") {
      # conditional effect for either existing levels of the random effects if specified,
      # or if not specified then for hypothetical new representative levels 
      if(subfield == "hypothetical typical subfield"){
        subfield_dummy = factor("hypothetical typical subfield", levels = unique(fit$data$subfield))
      } else {
        subfield_dummy <- subfield
      }
      
      if(journal == "hypothetical typical journal"){
        journal_dummy = factor("hypothetical typical journal", levels = unique(fit$data$journal))
      } else {
        journal_dummy <- journal
      }
      
      res <- 
        predictions(model = fitted_model,
                    newdata = datagrid(year_centered = year_centered,
                                       subfield = subfield_dummy,
                                       journal = journal_dummy),
                    re_formula = NULL,
                    allow_new_levels = TRUE) |>
        select(outcome = group, 
               prevalence_estimate = estimate,
               prevalence_ci_lower = conf.low,
               prevalence_ci_upper = conf.high)
      
    } else if (type == "marginal") {
      res <- 
        predictions(model = fit,
                    newdata = datagrid(year_centered = year_centered),
                    re_formula = NA,  
                    allow_new_levels = FALSE) |>
        select(outcome = group, 
               prevalence_estimate = estimate,
               prevalence_ci_lower = conf.low,
               prevalence_ci_upper = conf.high)
    }
    
    return(res)
  }
  
  # field - marginal effect
  posterior_prevalence_field_marginal <- 
    expand_grid(subfield = "across field", 
                journal = "across field",
                type = "marginal",
                re_level = "field") |>
    tibble(res = pmap(list(subfield, journal, type), 
                      est_prevalence, 
                      fit = fitted_model)) |>
    unnest(res) 
  
  # field - conditional effect
  posterior_prevalence_field_conditional <- 
    expand_grid(subfield = "hypothetical typical subfield", 
                journal = "hypothetical typical journal",
                type = "conditional",
                re_level = "field") |>
    tibble(res = pmap(list(subfield, journal, type), 
                      est_prevalence, 
                      fit = fitted_model)) |>
    unnest(res) 
  
  # subfields
  posterior_prevalence_subfields <- 
    expand_grid(data_centered |>
                  distinct(subfield),
                journal = "hypothetical typical journal",
                type = "conditional",
                re_level = "subfields") |>
    tibble(res = pmap(list(subfield, journal, type), 
                      est_prevalence, 
                      fit = fitted_model)) |>
    unnest(res) 
  
  # journals
  posterior_prevalence_journals <- 
    expand_grid(data_centered |>
                  distinct(subfield, journal),
                type = "conditional",
                re_level = "journals") |>
    tibble(res = pmap(list(subfield, journal, type), 
                      est_prevalence, 
                      fit = fitted_model)) |>
    unnest(res) 
  
  # combine
  posterior_prevalence <- 
    bind_rows(posterior_prevalence_field_marginal,
              posterior_prevalence_field_conditional,
              posterior_prevalence_subfields,
              posterior_prevalence_journals) |>
    mutate(label = case_when(re_level == "field" & type == "marginal" ~ "Psychology (marginal)",
                             re_level == "field" & type == "conditional" ~ "Psychology (conditional)",
                             re_level == "subfields" & journal == "hypothetical typical journal" ~ subfield,
                             journal != "hypothetical typical journal" & !is.na(journal) ~ journal)) |>
    mutate(label = fct_relevel(label,
                               "Psychology (marginal)",
                               "Psychology (conditional)",
                               subfield_and_journal_labels),
    label = fct_rev(label)) |>
    mutate(outcome = case_when(outcome == "directbehavioral" ~ "Direct Behavioral",     
                               outcome == "behavioralproxy" ~ "Behavioral Proxy",
                               outcome == "selfreportsaboutbehavior" ~ "Self-Report about Behavior",
                               outcome == "selfreportaboutsubjectivestate" ~ "Self-Report about Subjective States",
                               outcome == "neurobiopsychophys" ~ "Neuro/Bio/Psychophys",
                               outcome == "cognitiveability" ~ "Cognitive Ability",
                               TRUE ~ outcome),
           outcome = fct_relevel(outcome, 
                                 "Direct Behavioral",       
                                 "Behavioral Proxy",
                                 "Self-Report about Behavior",
                                 "Self-Report about Subjective States",
                                 "Neuro/Bio/Psychophys",
                                 "Cognitive Ability"),
           outcome = fct_rev(outcome),
           subfield = fct_relevel(subfield,
                                  "hypothetical typical subfield",
                                  "General",
                                  "Clinical",
                                  "Cognitive",
                                  "Developmental",
                                  "Industrial & Organizational",
                                  "Social & Personality")) |>
    mutate(prevalence_category = case_when(prevalence_estimate < .05 ~ "Rare",
                                           prevalence_estimate >= .05 & prevalence_estimate < .10 ~ "Uncommon",
                                           prevalence_estimate >= .10 & prevalence_estimate < .25 ~ "Occasional",
                                           prevalence_estimate >= .25 & prevalence_estimate < .50 ~ "Common",
                                           prevalence_estimate >= .50 ~ "Frequent"),
           prevalence_results = paste0(rnd(prevalence_estimate), ", 95% CI [", rnd(prevalence_ci_lower), ", ", rnd(prevalence_ci_upper), "]")) |>
    select(outcome, label, re_level, type, subfield, journal, 
           prevalence_estimate, prevalence_ci_lower, prevalence_ci_upper, prevalence_category, prevalence_results) |>
    arrange(outcome, desc(label), subfield)
  
  write_rds(posterior_prevalence, "models/posterior_prevalence.rds")
}

# print table
posterior_prevalence |>
  mutate_if(is.numeric, round_half_up, digits = 3) |>
  kable() |>
  kable_classic(full_width = FALSE)
outcome label re_level type subfield journal prevalence_estimate prevalence_ci_lower prevalence_ci_upper prevalence_category prevalence_results
Cognitive Ability Psychology (marginal) field marginal across field across field 0.046 0.025 0.080 Rare 0.05, 95% CI [0.03, 0.08]
Cognitive Ability Psychology (conditional) field conditional hypothetical typical subfield hypothetical typical journal 0.046 0.005 0.225 Rare 0.05, 95% CI [0.00, 0.22]
Cognitive Ability General subfields conditional General hypothetical typical journal 0.045 0.004 0.216 Rare 0.04, 95% CI [0.00, 0.22]
Cognitive Ability Collabra journals conditional General Collabra 0.057 0.021 0.124 Uncommon 0.06, 95% CI [0.02, 0.12]
Cognitive Ability JEP:G journals conditional General JEP:G 0.048 0.016 0.111 Rare 0.05, 95% CI [0.02, 0.11]
Cognitive Ability NHB journals conditional General NHB 0.025 0.004 0.072 Rare 0.02, 95% CI [0.00, 0.07]
Cognitive Ability PLOSONE journals conditional General PLOSONE 0.101 0.045 0.188 Occasional 0.10, 95% CI [0.04, 0.19]
Cognitive Ability PS journals conditional General PS 0.013 0.002 0.044 Rare 0.01, 95% CI [0.00, 0.04]
Cognitive Ability Clinical subfields conditional Clinical hypothetical typical journal 0.046 0.005 0.218 Rare 0.05, 95% CI [0.00, 0.22]
Cognitive Ability BRAT journals conditional Clinical BRAT 0.011 0.002 0.041 Rare 0.01, 95% CI [0.00, 0.04]
Cognitive Ability CPS journals conditional Clinical CPS 0.108 0.054 0.189 Occasional 0.11, 95% CI [0.05, 0.19]
Cognitive Ability JCCAP journals conditional Clinical JCCAP 0.026 0.005 0.076 Rare 0.03, 95% CI [0.00, 0.08]
Cognitive Ability JCCP journals conditional Clinical JCCP 0.044 0.012 0.109 Rare 0.04, 95% CI [0.01, 0.11]
Cognitive Ability JPCS journals conditional Clinical JPCS 0.086 0.034 0.170 Uncommon 0.09, 95% CI [0.03, 0.17]
Cognitive Ability Cognitive subfields conditional Cognitive hypothetical typical journal 0.046 0.005 0.219 Rare 0.05, 95% CI [0.00, 0.22]
Cognitive Ability Cognition journals conditional Cognitive Cognition 0.037 0.009 0.100 Rare 0.04, 95% CI [0.01, 0.10]
Cognitive Ability JEP:HPP journals conditional Cognitive JEP:HPP 0.053 0.015 0.142 Uncommon 0.05, 95% CI [0.01, 0.14]
Cognitive Ability JEP:LMC journals conditional Cognitive JEP:LMC 0.018 0.002 0.060 Rare 0.02, 95% CI [0.00, 0.06]
Cognitive Ability JML journals conditional Cognitive JML 0.079 0.024 0.201 Uncommon 0.08, 95% CI [0.02, 0.20]
Cognitive Ability M&C journals conditional Cognitive M&C 0.049 0.016 0.118 Rare 0.05, 95% CI [0.02, 0.12]
Cognitive Ability Developmental subfields conditional Developmental hypothetical typical journal 0.046 0.005 0.226 Rare 0.05, 95% CI [0.00, 0.23]
Cognitive Ability CD journals conditional Developmental CD 0.042 0.011 0.114 Rare 0.04, 95% CI [0.01, 0.11]
Cognitive Ability DP journals conditional Developmental DP 0.021 0.003 0.074 Rare 0.02, 95% CI [0.00, 0.07]
Cognitive Ability JECP journals conditional Developmental JECP 0.041 0.009 0.111 Rare 0.04, 95% CI [0.01, 0.11]
Cognitive Ability JRA journals conditional Developmental JRA 0.070 0.019 0.195 Uncommon 0.07, 95% CI [0.02, 0.19]
Cognitive Ability PA journals conditional Developmental PA 0.035 0.008 0.106 Rare 0.03, 95% CI [0.01, 0.11]
Cognitive Ability Industrial & Organizational subfields conditional Industrial & Organizational hypothetical typical journal 0.048 0.005 0.231 Rare 0.05, 95% CI [0.00, 0.23]
Cognitive Ability JAP journals conditional Industrial & Organizational JAP 0.132 0.050 0.271 Occasional 0.13, 95% CI [0.05, 0.27]
Cognitive Ability JEP:A journals conditional Industrial & Organizational JEP:A 0.103 0.035 0.228 Occasional 0.10, 95% CI [0.04, 0.23]
Cognitive Ability JOB journals conditional Industrial & Organizational JOB 0.019 0.003 0.063 Rare 0.02, 95% CI [0.00, 0.06]
Cognitive Ability OBHDP journals conditional Industrial & Organizational OBHDP 0.033 0.006 0.113 Rare 0.03, 95% CI [0.01, 0.11]
Cognitive Ability PP journals conditional Industrial & Organizational PP 0.063 0.017 0.170 Uncommon 0.06, 95% CI [0.02, 0.17]
Cognitive Ability Social & Personality subfields conditional Social & Personality hypothetical typical journal 0.048 0.005 0.228 Rare 0.05, 95% CI [0.00, 0.23]
Cognitive Ability Emotion journals conditional Social & Personality Emotion 0.219 0.123 0.341 Occasional 0.22, 95% CI [0.12, 0.34]
Cognitive Ability JESP journals conditional Social & Personality JESP 0.030 0.004 0.102 Rare 0.03, 95% CI [0.00, 0.10]
Cognitive Ability JPSP journals conditional Social & Personality JPSP 0.019 0.002 0.079 Rare 0.02, 95% CI [0.00, 0.08]
Cognitive Ability JRP journals conditional Social & Personality JRP 0.043 0.011 0.112 Rare 0.04, 95% CI [0.01, 0.11]
Cognitive Ability PSPB journals conditional Social & Personality PSPB 0.106 0.042 0.214 Occasional 0.11, 95% CI [0.04, 0.21]
Neuro/Bio/Psychophys Psychology (marginal) field marginal across field across field 0.092 0.053 0.160 Uncommon 0.09, 95% CI [0.05, 0.16]
Neuro/Bio/Psychophys Psychology (conditional) field conditional hypothetical typical subfield hypothetical typical journal 0.096 0.010 0.338 Uncommon 0.10, 95% CI [0.01, 0.34]
Neuro/Bio/Psychophys General subfields conditional General hypothetical typical journal 0.115 0.011 0.390 Occasional 0.12, 95% CI [0.01, 0.39]
Neuro/Bio/Psychophys Collabra journals conditional General Collabra 0.278 0.177 0.404 Common 0.28, 95% CI [0.18, 0.40]
Neuro/Bio/Psychophys JEP:G journals conditional General JEP:G 0.191 0.109 0.297 Occasional 0.19, 95% CI [0.11, 0.30]
Neuro/Bio/Psychophys NHB journals conditional General NHB 0.129 0.071 0.208 Occasional 0.13, 95% CI [0.07, 0.21]
Neuro/Bio/Psychophys PLOSONE journals conditional General PLOSONE 0.188 0.111 0.289 Occasional 0.19, 95% CI [0.11, 0.29]
Neuro/Bio/Psychophys PS journals conditional General PS 0.067 0.027 0.134 Uncommon 0.07, 95% CI [0.03, 0.13]
Neuro/Bio/Psychophys Clinical subfields conditional Clinical hypothetical typical journal 0.093 0.010 0.331 Uncommon 0.09, 95% CI [0.01, 0.33]
Neuro/Bio/Psychophys BRAT journals conditional Clinical BRAT 0.161 0.091 0.254 Occasional 0.16, 95% CI [0.09, 0.25]
Neuro/Bio/Psychophys CPS journals conditional Clinical CPS 0.167 0.094 0.264 Occasional 0.17, 95% CI [0.09, 0.26]
Neuro/Bio/Psychophys JCCAP journals conditional Clinical JCCAP 0.038 0.009 0.099 Rare 0.04, 95% CI [0.01, 0.10]
Neuro/Bio/Psychophys JCCP journals conditional Clinical JCCP 0.051 0.015 0.123 Uncommon 0.05, 95% CI [0.01, 0.12]
Neuro/Bio/Psychophys JPCS journals conditional Clinical JPCS 0.055 0.016 0.127 Uncommon 0.06, 95% CI [0.02, 0.13]
Neuro/Bio/Psychophys Cognitive subfields conditional Cognitive hypothetical typical journal 0.085 0.009 0.306 Uncommon 0.09, 95% CI [0.01, 0.31]
Neuro/Bio/Psychophys Cognition journals conditional Cognitive Cognition 0.019 0.003 0.063 Rare 0.02, 95% CI [0.00, 0.06]
Neuro/Bio/Psychophys JEP:HPP journals conditional Cognitive JEP:HPP 0.055 0.012 0.145 Uncommon 0.05, 95% CI [0.01, 0.15]
Neuro/Bio/Psychophys JEP:LMC journals conditional Cognitive JEP:LMC 0.061 0.020 0.136 Uncommon 0.06, 95% CI [0.02, 0.14]
Neuro/Bio/Psychophys JML journals conditional Cognitive JML 0.104 0.032 0.246 Occasional 0.10, 95% CI [0.03, 0.25]
Neuro/Bio/Psychophys M&C journals conditional Cognitive M&C 0.234 0.133 0.364 Occasional 0.23, 95% CI [0.13, 0.36]
Neuro/Bio/Psychophys Developmental subfields conditional Developmental hypothetical typical journal 0.082 0.008 0.304 Uncommon 0.08, 95% CI [0.01, 0.30]
Neuro/Bio/Psychophys CD journals conditional Developmental CD 0.053 0.014 0.135 Uncommon 0.05, 95% CI [0.01, 0.13]
Neuro/Bio/Psychophys DP journals conditional Developmental DP 0.116 0.045 0.236 Occasional 0.12, 95% CI [0.04, 0.24]
Neuro/Bio/Psychophys JECP journals conditional Developmental JECP 0.018 0.003 0.062 Rare 0.02, 95% CI [0.00, 0.06]
Neuro/Bio/Psychophys JRA journals conditional Developmental JRA 0.160 0.059 0.330 Occasional 0.16, 95% CI [0.06, 0.33]
Neuro/Bio/Psychophys PA journals conditional Developmental PA 0.048 0.011 0.132 Rare 0.05, 95% CI [0.01, 0.13]
Neuro/Bio/Psychophys Industrial & Organizational subfields conditional Industrial & Organizational hypothetical typical journal 0.103 0.010 0.360 Occasional 0.10, 95% CI [0.01, 0.36]
Neuro/Bio/Psychophys JAP journals conditional Industrial & Organizational JAP 0.064 0.015 0.165 Uncommon 0.06, 95% CI [0.01, 0.17]
Neuro/Bio/Psychophys JEP:A journals conditional Industrial & Organizational JEP:A 0.147 0.059 0.294 Occasional 0.15, 95% CI [0.06, 0.29]
Neuro/Bio/Psychophys JOB journals conditional Industrial & Organizational JOB 0.104 0.044 0.205 Occasional 0.10, 95% CI [0.04, 0.20]
Neuro/Bio/Psychophys OBHDP journals conditional Industrial & Organizational OBHDP 0.087 0.023 0.218 Uncommon 0.09, 95% CI [0.02, 0.22]
Neuro/Bio/Psychophys PP journals conditional Industrial & Organizational PP 0.170 0.072 0.324 Occasional 0.17, 95% CI [0.07, 0.32]
Neuro/Bio/Psychophys Social & Personality subfields conditional Social & Personality hypothetical typical journal 0.089 0.009 0.316 Uncommon 0.09, 95% CI [0.01, 0.32]
Neuro/Bio/Psychophys Emotion journals conditional Social & Personality Emotion 0.023 0.004 0.072 Rare 0.02, 95% CI [0.00, 0.07]
Neuro/Bio/Psychophys JESP journals conditional Social & Personality JESP 0.030 0.004 0.103 Rare 0.03, 95% CI [0.00, 0.10]
Neuro/Bio/Psychophys JPSP journals conditional Social & Personality JPSP 0.079 0.019 0.209 Uncommon 0.08, 95% CI [0.02, 0.21]
Neuro/Bio/Psychophys JRP journals conditional Social & Personality JRP 0.229 0.138 0.346 Occasional 0.23, 95% CI [0.14, 0.35]
Neuro/Bio/Psychophys PSPB journals conditional Social & Personality PSPB 0.164 0.078 0.291 Occasional 0.16, 95% CI [0.08, 0.29]
Self-Report about Subjective States Psychology (marginal) field marginal across field across field 0.868 0.676 0.944 Frequent 0.87, 95% CI [0.68, 0.94]
Self-Report about Subjective States Psychology (conditional) field conditional hypothetical typical subfield hypothetical typical journal 0.888 0.414 0.993 Frequent 0.89, 95% CI [0.41, 0.99]
Self-Report about Subjective States General subfields conditional General hypothetical typical journal 0.973 0.827 0.997 Frequent 0.97, 95% CI [0.83, 1.00]
Self-Report about Subjective States Collabra journals conditional General Collabra 0.991 0.964 0.999 Frequent 0.99, 95% CI [0.96, 1.00]
Self-Report about Subjective States JEP:G journals conditional General JEP:G 0.988 0.956 0.998 Frequent 0.99, 95% CI [0.96, 1.00]
Self-Report about Subjective States NHB journals conditional General NHB 0.883 0.805 0.937 Frequent 0.88, 95% CI [0.81, 0.94]
Self-Report about Subjective States PLOSONE journals conditional General PLOSONE 0.961 0.904 0.989 Frequent 0.96, 95% CI [0.90, 0.99]
Self-Report about Subjective States PS journals conditional General PS 0.988 0.958 0.998 Frequent 0.99, 95% CI [0.96, 1.00]
Self-Report about Subjective States Clinical subfields conditional Clinical hypothetical typical journal 0.945 0.711 0.992 Frequent 0.95, 95% CI [0.71, 0.99]
Self-Report about Subjective States BRAT journals conditional Clinical BRAT 0.947 0.889 0.980 Frequent 0.95, 95% CI [0.89, 0.98]
Self-Report about Subjective States CPS journals conditional Clinical CPS 0.979 0.939 0.996 Frequent 0.98, 95% CI [0.94, 1.00]
Self-Report about Subjective States JCCAP journals conditional Clinical JCCAP 0.978 0.939 0.996 Frequent 0.98, 95% CI [0.94, 1.00]
Self-Report about Subjective States JCCP journals conditional Clinical JCCP 0.781 0.663 0.874 Frequent 0.78, 95% CI [0.66, 0.87]
Self-Report about Subjective States JPCS journals conditional Clinical JPCS 0.940 0.874 0.977 Frequent 0.94, 95% CI [0.87, 0.98]
Self-Report about Subjective States Cognitive subfields conditional Cognitive hypothetical typical journal 0.929 0.623 0.990 Frequent 0.93, 95% CI [0.62, 0.99]
Self-Report about Subjective States Cognition journals conditional Cognitive Cognition 0.941 0.867 0.979 Frequent 0.94, 95% CI [0.87, 0.98]
Self-Report about Subjective States JEP:HPP journals conditional Cognitive JEP:HPP 0.892 0.769 0.959 Frequent 0.89, 95% CI [0.77, 0.96]
Self-Report about Subjective States JEP:LMC journals conditional Cognitive JEP:LMC 0.925 0.841 0.973 Frequent 0.93, 95% CI [0.84, 0.97]
Self-Report about Subjective States JML journals conditional Cognitive JML 0.944 0.843 0.986 Frequent 0.94, 95% CI [0.84, 0.99]
Self-Report about Subjective States M&C journals conditional Cognitive M&C 0.941 0.863 0.979 Frequent 0.94, 95% CI [0.86, 0.98]
Self-Report about Subjective States Developmental subfields conditional Developmental hypothetical typical journal 0.779 0.323 0.964 Frequent 0.78, 95% CI [0.32, 0.96]
Self-Report about Subjective States CD journals conditional Developmental CD 0.819 0.689 0.911 Frequent 0.82, 95% CI [0.69, 0.91]
Self-Report about Subjective States DP journals conditional Developmental DP 0.811 0.670 0.913 Frequent 0.81, 95% CI [0.67, 0.91]
Self-Report about Subjective States JECP journals conditional Developmental JECP 0.765 0.639 0.864 Frequent 0.77, 95% CI [0.64, 0.86]
Self-Report about Subjective States JRA journals conditional Developmental JRA 0.805 0.625 0.924 Frequent 0.81, 95% CI [0.62, 0.92]
Self-Report about Subjective States PA journals conditional Developmental PA 0.692 0.537 0.823 Frequent 0.69, 95% CI [0.54, 0.82]
Self-Report about Subjective States Industrial & Organizational subfields conditional Industrial & Organizational hypothetical typical journal 0.782 0.333 0.967 Frequent 0.78, 95% CI [0.33, 0.97]
Self-Report about Subjective States JAP journals conditional Industrial & Organizational JAP 0.802 0.656 0.908 Frequent 0.80, 95% CI [0.66, 0.91]
Self-Report about Subjective States JEP:A journals conditional Industrial & Organizational JEP:A 0.754 0.591 0.877 Frequent 0.75, 95% CI [0.59, 0.88]
Self-Report about Subjective States JOB journals conditional Industrial & Organizational JOB 0.634 0.497 0.759 Frequent 0.63, 95% CI [0.50, 0.76]
Self-Report about Subjective States OBHDP journals conditional Industrial & Organizational OBHDP 0.854 0.702 0.948 Frequent 0.85, 95% CI [0.70, 0.95]
Self-Report about Subjective States PP journals conditional Industrial & Organizational PP 0.563 0.393 0.727 Frequent 0.56, 95% CI [0.39, 0.73]
Self-Report about Subjective States Social & Personality subfields conditional Social & Personality hypothetical typical journal 0.799 0.372 0.968 Frequent 0.80, 95% CI [0.37, 0.97]
Self-Report about Subjective States Emotion journals conditional Social & Personality Emotion 0.540 0.414 0.660 Frequent 0.54, 95% CI [0.41, 0.66]
Self-Report about Subjective States JESP journals conditional Social & Personality JESP 0.794 0.634 0.907 Frequent 0.79, 95% CI [0.63, 0.91]
Self-Report about Subjective States JPSP journals conditional Social & Personality JPSP 0.755 0.569 0.890 Frequent 0.75, 95% CI [0.57, 0.89]
Self-Report about Subjective States JRP journals conditional Social & Personality JRP 0.751 0.636 0.846 Frequent 0.75, 95% CI [0.64, 0.85]
Self-Report about Subjective States PSPB journals conditional Social & Personality PSPB 0.913 0.816 0.970 Frequent 0.91, 95% CI [0.82, 0.97]
Self-Report about Behavior Psychology (marginal) field marginal across field across field 0.073 0.040 0.152 Uncommon 0.07, 95% CI [0.04, 0.15]
Self-Report about Behavior Psychology (conditional) field conditional hypothetical typical subfield hypothetical typical journal 0.068 0.009 0.245 Uncommon 0.07, 95% CI [0.01, 0.24]
Self-Report about Behavior General subfields conditional General hypothetical typical journal 0.043 0.006 0.161 Rare 0.04, 95% CI [0.01, 0.16]
Self-Report about Behavior Collabra journals conditional General Collabra 0.063 0.024 0.132 Uncommon 0.06, 95% CI [0.02, 0.13]
Self-Report about Behavior JEP:G journals conditional General JEP:G 0.080 0.030 0.177 Uncommon 0.08, 95% CI [0.03, 0.18]
Self-Report about Behavior NHB journals conditional General NHB 0.012 0.002 0.041 Rare 0.01, 95% CI [0.00, 0.04]
Self-Report about Behavior PLOSONE journals conditional General PLOSONE 0.023 0.004 0.068 Rare 0.02, 95% CI [0.00, 0.07]
Self-Report about Behavior PS journals conditional General PS 0.036 0.009 0.090 Rare 0.04, 95% CI [0.01, 0.09]
Self-Report about Behavior Clinical subfields conditional Clinical hypothetical typical journal 0.064 0.009 0.201 Uncommon 0.06, 95% CI [0.01, 0.20]
Self-Report about Behavior BRAT journals conditional Clinical BRAT 0.113 0.061 0.191 Occasional 0.11, 95% CI [0.06, 0.19]
Self-Report about Behavior CPS journals conditional Clinical CPS 0.048 0.014 0.107 Rare 0.05, 95% CI [0.01, 0.11]
Self-Report about Behavior JCCAP journals conditional Clinical JCCAP 0.065 0.026 0.128 Uncommon 0.06, 95% CI [0.03, 0.13]
Self-Report about Behavior JCCP journals conditional Clinical JCCP 0.021 0.004 0.063 Rare 0.02, 95% CI [0.00, 0.06]
Self-Report about Behavior JPCS journals conditional Clinical JPCS 0.093 0.043 0.176 Uncommon 0.09, 95% CI [0.04, 0.18]
Self-Report about Behavior Cognitive subfields conditional Cognitive hypothetical typical journal 0.087 0.012 0.270 Uncommon 0.09, 95% CI [0.01, 0.27]
Self-Report about Behavior Cognition journals conditional Cognitive Cognition 0.110 0.052 0.203 Occasional 0.11, 95% CI [0.05, 0.20]
Self-Report about Behavior JEP:HPP journals conditional Cognitive JEP:HPP 0.102 0.039 0.212 Occasional 0.10, 95% CI [0.04, 0.21]
Self-Report about Behavior JEP:LMC journals conditional Cognitive JEP:LMC 0.055 0.015 0.126 Uncommon 0.06, 95% CI [0.02, 0.13]
Self-Report about Behavior JML journals conditional Cognitive JML 0.095 0.034 0.212 Uncommon 0.10, 95% CI [0.03, 0.21]
Self-Report about Behavior M&C journals conditional Cognitive M&C 0.113 0.054 0.209 Occasional 0.11, 95% CI [0.05, 0.21]
Self-Report about Behavior Developmental subfields conditional Developmental hypothetical typical journal 0.090 0.013 0.271 Uncommon 0.09, 95% CI [0.01, 0.27]
Self-Report about Behavior CD journals conditional Developmental CD 0.135 0.065 0.253 Occasional 0.14, 95% CI [0.07, 0.25]
Self-Report about Behavior DP journals conditional Developmental DP 0.129 0.053 0.256 Occasional 0.13, 95% CI [0.05, 0.26]
Self-Report about Behavior JECP journals conditional Developmental JECP 0.141 0.069 0.252 Occasional 0.14, 95% CI [0.07, 0.25]
Self-Report about Behavior JRA journals conditional Developmental JRA 0.127 0.043 0.289 Occasional 0.13, 95% CI [0.04, 0.29]
Self-Report about Behavior PA journals conditional Developmental PA 0.052 0.010 0.134 Uncommon 0.05, 95% CI [0.01, 0.13]
Self-Report about Behavior Industrial & Organizational subfields conditional Industrial & Organizational hypothetical typical journal 0.048 0.007 0.183 Rare 0.05, 95% CI [0.01, 0.18]
Self-Report about Behavior JAP journals conditional Industrial & Organizational JAP 0.025 0.004 0.076 Rare 0.02, 95% CI [0.00, 0.08]
Self-Report about Behavior JEP:A journals conditional Industrial & Organizational JEP:A 0.038 0.009 0.108 Rare 0.04, 95% CI [0.01, 0.11]
Self-Report about Behavior JOB journals conditional Industrial & Organizational JOB 0.049 0.016 0.117 Rare 0.05, 95% CI [0.02, 0.12]
Self-Report about Behavior OBHDP journals conditional Industrial & Organizational OBHDP 0.056 0.015 0.153 Uncommon 0.06, 95% CI [0.02, 0.15]
Self-Report about Behavior PP journals conditional Industrial & Organizational PP 0.023 0.004 0.074 Rare 0.02, 95% CI [0.00, 0.07]
Self-Report about Behavior Social & Personality subfields conditional Social & Personality hypothetical typical journal 0.090 0.013 0.290 Uncommon 0.09, 95% CI [0.01, 0.29]
Self-Report about Behavior Emotion journals conditional Social & Personality Emotion 0.059 0.021 0.125 Uncommon 0.06, 95% CI [0.02, 0.13]
Self-Report about Behavior JESP journals conditional Social & Personality JESP 0.086 0.028 0.198 Uncommon 0.09, 95% CI [0.03, 0.20]
Self-Report about Behavior JPSP journals conditional Social & Personality JPSP 0.160 0.067 0.336 Occasional 0.16, 95% CI [0.07, 0.34]
Self-Report about Behavior JRP journals conditional Social & Personality JRP 0.064 0.018 0.144 Uncommon 0.06, 95% CI [0.02, 0.14]
Self-Report about Behavior PSPB journals conditional Social & Personality PSPB 0.120 0.054 0.230 Occasional 0.12, 95% CI [0.05, 0.23]
Behavioral Proxy Psychology (marginal) field marginal across field across field 0.053 0.027 0.104 Uncommon 0.05, 95% CI [0.03, 0.10]
Behavioral Proxy Psychology (conditional) field conditional hypothetical typical subfield hypothetical typical journal 0.049 0.004 0.304 Rare 0.05, 95% CI [0.00, 0.30]
Behavioral Proxy General subfields conditional General hypothetical typical journal 0.047 0.004 0.301 Rare 0.05, 95% CI [0.00, 0.30]
Behavioral Proxy Collabra journals conditional General Collabra 0.083 0.032 0.171 Uncommon 0.08, 95% CI [0.03, 0.17]
Behavioral Proxy JEP:G journals conditional General JEP:G 0.099 0.044 0.187 Uncommon 0.10, 95% CI [0.04, 0.19]
Behavioral Proxy NHB journals conditional General NHB 0.042 0.014 0.097 Rare 0.04, 95% CI [0.01, 0.10]
Behavioral Proxy PLOSONE journals conditional General PLOSONE 0.012 0.001 0.045 Rare 0.01, 95% CI [0.00, 0.05]
Behavioral Proxy PS journals conditional General PS 0.052 0.018 0.113 Uncommon 0.05, 95% CI [0.02, 0.11]
Behavioral Proxy Clinical subfields conditional Clinical hypothetical typical journal 0.051 0.004 0.314 Uncommon 0.05, 95% CI [0.00, 0.31]
Behavioral Proxy BRAT journals conditional Clinical BRAT 0.286 0.189 0.397 Common 0.29, 95% CI [0.19, 0.40]
Behavioral Proxy CPS journals conditional Clinical CPS 0.047 0.016 0.106 Rare 0.05, 95% CI [0.02, 0.11]
Behavioral Proxy JCCAP journals conditional Clinical JCCAP 0.039 0.007 0.107 Rare 0.04, 95% CI [0.01, 0.11]
Behavioral Proxy JCCP journals conditional Clinical JCCP 0.035 0.008 0.098 Rare 0.04, 95% CI [0.01, 0.10]
Behavioral Proxy JPCS journals conditional Clinical JPCS 0.024 0.004 0.072 Rare 0.02, 95% CI [0.00, 0.07]
Behavioral Proxy Cognitive subfields conditional Cognitive hypothetical typical journal 0.052 0.004 0.318 Uncommon 0.05, 95% CI [0.00, 0.32]
Behavioral Proxy Cognition journals conditional Cognitive Cognition 0.044 0.010 0.119 Rare 0.04, 95% CI [0.01, 0.12]
Behavioral Proxy JEP:HPP journals conditional Cognitive JEP:HPP 0.022 0.002 0.085 Rare 0.02, 95% CI [0.00, 0.09]
Behavioral Proxy JEP:LMC journals conditional Cognitive JEP:LMC 0.106 0.045 0.201 Occasional 0.11, 95% CI [0.04, 0.20]
Behavioral Proxy JML journals conditional Cognitive JML 0.050 0.011 0.151 Uncommon 0.05, 95% CI [0.01, 0.15]
Behavioral Proxy M&C journals conditional Cognitive M&C 0.116 0.051 0.220 Occasional 0.12, 95% CI [0.05, 0.22]
Behavioral Proxy Developmental subfields conditional Developmental hypothetical typical journal 0.055 0.004 0.333 Uncommon 0.05, 95% CI [0.00, 0.33]
Behavioral Proxy CD journals conditional Developmental CD 0.061 0.017 0.146 Uncommon 0.06, 95% CI [0.02, 0.15]
Behavioral Proxy DP journals conditional Developmental DP 0.103 0.035 0.223 Occasional 0.10, 95% CI [0.04, 0.22]
Behavioral Proxy JECP journals conditional Developmental JECP 0.019 0.002 0.068 Rare 0.02, 95% CI [0.00, 0.07]
Behavioral Proxy JRA journals conditional Developmental JRA 0.140 0.046 0.315 Occasional 0.14, 95% CI [0.05, 0.31]
Behavioral Proxy PA journals conditional Developmental PA 0.144 0.059 0.274 Occasional 0.14, 95% CI [0.06, 0.27]
Behavioral Proxy Industrial & Organizational subfields conditional Industrial & Organizational hypothetical typical journal 0.046 0.003 0.287 Rare 0.05, 95% CI [0.00, 0.29]
Behavioral Proxy JAP journals conditional Industrial & Organizational JAP 0.013 0.001 0.061 Rare 0.01, 95% CI [0.00, 0.06]
Behavioral Proxy JEP:A journals conditional Industrial & Organizational JEP:A 0.017 0.002 0.075 Rare 0.02, 95% CI [0.00, 0.07]
Behavioral Proxy JOB journals conditional Industrial & Organizational JOB 0.108 0.044 0.210 Occasional 0.11, 95% CI [0.04, 0.21]
Behavioral Proxy OBHDP journals conditional Industrial & Organizational OBHDP 0.098 0.029 0.246 Uncommon 0.10, 95% CI [0.03, 0.25]
Behavioral Proxy PP journals conditional Industrial & Organizational PP 0.019 0.002 0.079 Rare 0.02, 95% CI [0.00, 0.08]
Behavioral Proxy Social & Personality subfields conditional Social & Personality hypothetical typical journal 0.044 0.003 0.286 Rare 0.04, 95% CI [0.00, 0.29]
Behavioral Proxy Emotion journals conditional Social & Personality Emotion 0.022 0.003 0.075 Rare 0.02, 95% CI [0.00, 0.08]
Behavioral Proxy JESP journals conditional Social & Personality JESP 0.018 0.002 0.080 Rare 0.02, 95% CI [0.00, 0.08]
Behavioral Proxy JPSP journals conditional Social & Personality JPSP 0.210 0.083 0.406 Occasional 0.21, 95% CI [0.08, 0.41]
Behavioral Proxy JRP journals conditional Social & Personality JRP 0.017 0.002 0.061 Rare 0.02, 95% CI [0.00, 0.06]
Behavioral Proxy PSPB journals conditional Social & Personality PSPB 0.018 0.002 0.069 Rare 0.02, 95% CI [0.00, 0.07]
Direct Behavioral Psychology (marginal) field marginal across field across field 0.014 0.005 0.069 Rare 0.01, 95% CI [0.01, 0.07]
Direct Behavioral Psychology (conditional) field conditional hypothetical typical subfield hypothetical typical journal 0.010 0.000 0.095 Rare 0.01, 95% CI [0.00, 0.09]
Direct Behavioral General subfields conditional General hypothetical typical journal 0.008 0.000 0.076 Rare 0.01, 95% CI [0.00, 0.08]
Direct Behavioral Collabra journals conditional General Collabra 0.044 0.012 0.113 Rare 0.04, 95% CI [0.01, 0.11]
Direct Behavioral JEP:G journals conditional General JEP:G 0.005 0.000 0.028 Rare 0.01, 95% CI [0.00, 0.03]
Direct Behavioral NHB journals conditional General NHB 0.003 0.000 0.021 Rare 0.00, 95% CI [0.00, 0.02]
Direct Behavioral PLOSONE journals conditional General PLOSONE 0.002 0.000 0.016 Rare 0.00, 95% CI [0.00, 0.02]
Direct Behavioral PS journals conditional General PS 0.008 0.000 0.041 Rare 0.01, 95% CI [0.00, 0.04]
Direct Behavioral Clinical subfields conditional Clinical hypothetical typical journal 0.009 0.000 0.078 Rare 0.01, 95% CI [0.00, 0.08]
Direct Behavioral BRAT journals conditional Clinical BRAT 0.041 0.013 0.099 Rare 0.04, 95% CI [0.01, 0.10]
Direct Behavioral CPS journals conditional Clinical CPS 0.005 0.000 0.026 Rare 0.01, 95% CI [0.00, 0.03]
Direct Behavioral JCCAP journals conditional Clinical JCCAP 0.011 0.001 0.051 Rare 0.01, 95% CI [0.00, 0.05]
Direct Behavioral JCCP journals conditional Clinical JCCP 0.002 0.000 0.019 Rare 0.00, 95% CI [0.00, 0.02]
Direct Behavioral JPCS journals conditional Clinical JPCS 0.006 0.000 0.031 Rare 0.01, 95% CI [0.00, 0.03]
Direct Behavioral Cognitive subfields conditional Cognitive hypothetical typical journal 0.010 0.000 0.094 Rare 0.01, 95% CI [0.00, 0.09]
Direct Behavioral Cognition journals conditional Cognitive Cognition 0.013 0.001 0.060 Rare 0.01, 95% CI [0.00, 0.06]
Direct Behavioral JEP:HPP journals conditional Cognitive JEP:HPP 0.024 0.004 0.108 Rare 0.02, 95% CI [0.00, 0.11]
Direct Behavioral JEP:LMC journals conditional Cognitive JEP:LMC 0.015 0.001 0.065 Rare 0.02, 95% CI [0.00, 0.07]
Direct Behavioral JML journals conditional Cognitive JML 0.007 0.000 0.041 Rare 0.01, 95% CI [0.00, 0.04]
Direct Behavioral M&C journals conditional Cognitive M&C 0.007 0.000 0.035 Rare 0.01, 95% CI [0.00, 0.03]
Direct Behavioral Developmental subfields conditional Developmental hypothetical typical journal 0.014 0.000 0.132 Rare 0.01, 95% CI [0.00, 0.13]
Direct Behavioral CD journals conditional Developmental CD 0.019 0.002 0.081 Rare 0.02, 95% CI [0.00, 0.08]
Direct Behavioral DP journals conditional Developmental DP 0.022 0.003 0.090 Rare 0.02, 95% CI [0.00, 0.09]
Direct Behavioral JECP journals conditional Developmental JECP 0.040 0.011 0.111 Rare 0.04, 95% CI [0.01, 0.11]
Direct Behavioral JRA journals conditional Developmental JRA 0.008 0.000 0.053 Rare 0.01, 95% CI [0.00, 0.05]
Direct Behavioral PA journals conditional Developmental PA 0.019 0.002 0.084 Rare 0.02, 95% CI [0.00, 0.08]
Direct Behavioral Industrial & Organizational subfields conditional Industrial & Organizational hypothetical typical journal 0.009 0.000 0.083 Rare 0.01, 95% CI [0.00, 0.08]
Direct Behavioral JAP journals conditional Industrial & Organizational JAP 0.004 0.000 0.025 Rare 0.00, 95% CI [0.00, 0.03]
Direct Behavioral JEP:A journals conditional Industrial & Organizational JEP:A 0.006 0.000 0.037 Rare 0.01, 95% CI [0.00, 0.04]
Direct Behavioral JOB journals conditional Industrial & Organizational JOB 0.006 0.000 0.033 Rare 0.01, 95% CI [0.00, 0.03]
Direct Behavioral OBHDP journals conditional Industrial & Organizational OBHDP 0.022 0.003 0.108 Rare 0.02, 95% CI [0.00, 0.11]
Direct Behavioral PP journals conditional Industrial & Organizational PP 0.007 0.000 0.043 Rare 0.01, 95% CI [0.00, 0.04]
Direct Behavioral Social & Personality subfields conditional Social & Personality hypothetical typical journal 0.009 0.000 0.089 Rare 0.01, 95% CI [0.00, 0.09]
Direct Behavioral Emotion journals conditional Social & Personality Emotion 0.005 0.000 0.031 Rare 0.00, 95% CI [0.00, 0.03]
Direct Behavioral JESP journals conditional Social & Personality JESP 0.008 0.000 0.044 Rare 0.01, 95% CI [0.00, 0.04]
Direct Behavioral JPSP journals conditional Social & Personality JPSP 0.009 0.000 0.054 Rare 0.01, 95% CI [0.00, 0.05]
Direct Behavioral JRP journals conditional Social & Personality JRP 0.003 0.000 0.021 Rare 0.00, 95% CI [0.00, 0.02]
Direct Behavioral PSPB journals conditional Social & Personality PSPB 0.021 0.004 0.085 Rare 0.02, 95% CI [0.00, 0.09]

Plot field + subfields

p_prevalence_subfields <- posterior_prevalence |>
  filter(re_level != "journals") |>
  ggplot(aes(prevalence_estimate, outcome)) +
  geom_rect(aes(xmin = 0.00, xmax = 0.05, ymin = -Inf, ymax = Inf, color = NULL),
            fill = "grey65") +
  geom_rect(aes(xmin = 0.05, xmax = 0.10, ymin = -Inf, ymax = Inf, color = NULL),
            fill = "grey73") +
  geom_rect(aes(xmin = 0.10, xmax = 0.25, ymin = -Inf, ymax = Inf, color = NULL),
            fill = "grey80") +
  geom_rect(aes(xmin = 0.25, xmax = 0.50, ymin = -Inf, ymax = Inf, color = NULL),
            fill = "grey90") +
  geom_rect(aes(xmin = 0.50, xmax = 1.00, ymin = -Inf, ymax = Inf, color = NULL),
            fill = "grey95") +
  annotate("text", x = 0.0250, y = "Self-Report about Behavior", label = "Rare",       size = 4, color = "grey30", angle = 90) +
  annotate("text", x = 0.0725, y = "Self-Report about Behavior", label = "Uncommon",   size = 4, color = "grey40", angle = 90) +
  annotate("text", x = 0.1750, y = "Self-Report about Behavior", label = "Occasional", size = 4, color = "grey50", angle = 90) +
  annotate("text", x = 0.3750, y = "Self-Report about Behavior", label = "Common",     size = 4, color = "grey60", angle = 90) +
  annotate("text", x = 0.7500, y = "Self-Report about Behavior", label = "Frequent",   size = 4, color = "grey65", angle = 90) +
  geom_linerangeh(aes(xmin = prevalence_ci_lower, xmax = prevalence_ci_upper), position = position_dodge(width = .7)) +
  geom_point(position = position_dodge(width = .7)) +
  coord_cartesian(xlim = c(0, 1)) +
  theme_linedraw() + 
  theme(panel.grid.major = element_blank(), 
        panel.grid.minor = element_blank(),
        panel.spacing = unit(1, "lines")) +  # Increase spacing between facets  
  ylab("") +
  xlab("Prevalence") +
  #scale_x_continuous(labels = scales::label_percent(), breaks = c(0, 0.05, 0.1, 0.25, 0.5, 1)) +
  scale_x_continuous(labels = c("0%", "5%", "10%", "25%", "50%", "75%", "100%"),
                     breaks = c(0, 0.05, 0.10, 0.25, 0.50, 0.75, 1),
                     minor_breaks = NULL,
                     expand = c(0,0)) +
  guides(color = guide_legend(title = "Measure mode",
                              reverse = TRUE)) +
  facet_wrap(~ fct_rev(label), ncol = 2)

p_prevalence_subfields

quicksave("p_prevalence_subfields", 11, 6)

Plot journals

p_prevalence_journals <- posterior_prevalence |>
  filter(re_level == "journals") |>
  mutate(label = fct_relevel(label, subfield_and_journal_labels_without_subfields),
         label = fct_rev(label),
         outcome = fct_relevel(outcome, 
                               "Direct Behavioral",     
                               "Behavioral Proxy",
                               "Self-Report about Behavior",
                               "Self-Report about Subjective States",
                               "Neuro/Bio/Psychophys",
                               "Cognitive Ability")) |>
  ggplot(aes(prevalence_estimate, label, color = subfield)) +
  geom_linerangeh(aes(xmin = prevalence_ci_lower, xmax = prevalence_ci_upper)) +
  geom_point() +
  coord_cartesian(xlim = c(0, 1)) +
  theme_linedraw() +
  ylab("") +
  xlab("Prevalence") +
  guides(color = guide_legend(title = "Measure mode")) +
  facet_wrap(~ outcome, ncol = 3)

p_prevalence_journals

quicksave("p_prevalence_journals", 12, 10)

Trend

if(exists("models/posterior_trends.rds")){
  posterior_trends <- read_rds("models/posterior_trends.rds")
} else {
  
  est_trend <- function(subfield = "hypothetical typical subfield", journal = "hypothetical typical journal", type = c("conditional", "marginal"), fit) {
    
    # reminder of the distinction: 
    # "a typical journal..." (conditional effect, taking levels of the random effects into account, whether existing or new hypothetical ones) vs.
    # "typically, journals..." (marginal effect, ignoring the random effects, therefore likely producing wider estimates given any heterogeneity among the random effects)
    
    if(type == "conditional") {
      # conditional effect for either existing levels of the random effects if specified,
      # or if not specified then for hypothetical new representative levels 
      if(subfield == "hypothetical typical subfield"){
        subfield = factor("hypothetical typical subfield", levels = unique(fit$data$subfield))
      }
      
      if(journal == "hypothetical typical journal"){
        journal = factor("hypothetical typical journal", levels = unique(fit$data$journal))
      }
      
      res <- 
        slopes(model = fit,
               variables = "year_centered", 
               newdata = datagrid(subfield = subfield,
                                  journal = journal),
               re_formula = NULL, 
               allow_new_levels = TRUE) |>
        select(outcome = group,
               trend_estimate = estimate,
               trend_ci_lower = conf.low,
               trend_ci_upper = conf.high)
      
    } else if (type == "marginal") {
      res <- 
        avg_slopes(model = fit,
                   variables = "year_centered",
                   re_formula = NA, 
                   allow_new_levels = FALSE) |>
        select(outcome = group,
               trend_estimate = estimate,
               trend_ci_lower = conf.low,
               trend_ci_upper = conf.high)
    }
    
    return(res)
  }
  
  # field - marginal effect
  posterior_trend_field_marginal <- 
    expand_grid(subfield = "across field", 
                journal = "across field",
                type = "marginal",
                re_level = "field") |>
    tibble(res = pmap(list(subfield, journal, type), 
                      est_trend, 
                      fit = fitted_model)) |>
    unnest(res) 
  
  # field - conditional effect
  posterior_trend_field_conditional <- 
    expand_grid(subfield = "hypothetical typical subfield", 
                journal = "hypothetical typical journal",
                type = "conditional",
                re_level = "field") |>
    tibble(res = pmap(list(subfield, journal, type), 
                      est_trend, 
                      fit = fitted_model)) |>
    unnest(res) 
  
  # subfields
  posterior_trend_subfields <- 
    expand_grid(data_centered |>
                  distinct(subfield),
                journal = "hypothetical typical journal",
                type = "conditional",
                re_level = "subfields") |>
    tibble(res = pmap(list(subfield, journal, type), 
                      est_trend, 
                      fit = fitted_model)) |>
    unnest(res) 
  
  # journals
  posterior_trend_journals <- 
    expand_grid(data_centered |>
                  distinct(subfield, journal),
                type = "conditional",
                re_level = "journals") |>
    tibble(res = pmap(list(subfield, journal, type), 
                      est_trend, 
                      fit = fitted_model)) |>
    unnest(res) 
  
  # combine
  posterior_trends <- 
    bind_rows(posterior_trend_field_marginal,
              posterior_trend_field_conditional,
              posterior_trend_subfields,
              posterior_trend_journals) |>
    mutate(subfield = ifelse(is.na(subfield), "", subfield),
           journal = ifelse(is.na(journal), "", journal)) |>
    mutate(label = case_when(re_level == "field" & type == "marginal" ~ "Psychology (marginal)",
                             re_level == "field" & type == "conditional" ~ "Psychology (conditional)",
                             re_level == "subfields" & journal == "hypothetical typical journal" ~ subfield,
                             journal != "hypothetical typical journal" & !is.na(journal) ~ journal)) |>
    mutate(label = fct_relevel(label,
                               "Psychology (marginal)",
                               "Psychology (conditional)",
                               subfield_and_journal_labels),
    label = fct_rev(label)) |>
    mutate(outcome = case_when(outcome == "directbehavioral" ~ "Direct Behavioral",     
                               outcome == "behavioralproxy" ~ "Behavioral Proxy",
                               outcome == "selfreportsaboutbehavior" ~ "Self-Report about Behavior",
                               outcome == "selfreportaboutsubjectivestate" ~ "Self-Report about Subjective States",
                               outcome == "neurobiopsychophys" ~ "Neuro/Bio/Psychophys",
                               outcome == "cognitiveability" ~ "Cognitive Ability",
                               TRUE ~ outcome),
           outcome = fct_relevel(outcome, 
                                 "Direct Behavioral",       
                                 "Behavioral Proxy",
                                 "Self-Report about Behavior",
                                 "Self-Report about Subjective States",
                                 "Neuro/Bio/Psychophys",
                                 "Cognitive Ability"),
           outcome = fct_rev(outcome),
           subfield = fct_relevel(subfield,
                                  "hypothetical typical subfield",
                                  "General",
                                  "Clinical",
                                  "Cognitive",
                                  "Developmental",
                                  "Industrial & Organizational",
                                  "Social & Personality")) |>
    mutate(trend_category = case_when(trend_ci_lower > 0 ~ "Increasing",
                                      trend_ci_upper < 0 ~ "Decreasing",
                                      TRUE ~ "No trend detected"),
           trend_results = paste0(rnd(trend_estimate), ", 95% CI [", rnd(trend_ci_lower), ", ", rnd(trend_ci_upper), "]")) |>
    select(outcome, label, re_level, type, subfield, journal, 
           trend_estimate, trend_ci_lower, trend_ci_upper, trend_category, trend_results) |>
    arrange(outcome, desc(label), subfield)
  
  write_rds(posterior_trends, "models/posterior_trends.rds")
}

# print table
posterior_trends |>
  mutate_if(is.numeric, round_half_up, digits = 3) |>
  kable() |>
  kable_classic(full_width = FALSE)
outcome label re_level type subfield journal trend_estimate trend_ci_lower trend_ci_upper trend_category trend_results
Cognitive Ability Psychology (marginal) field marginal across field across field 0.002 -0.004 0.009 No trend detected 0.00, 95% CI [-0.00, 0.01]
Cognitive Ability Psychology (conditional) field conditional hypothetical typical subfield hypothetical typical journal 0.001 -0.029 0.028 No trend detected 0.00, 95% CI [-0.03, 0.03]
Cognitive Ability General subfields conditional General hypothetical typical journal 0.000 -0.034 0.024 No trend detected 0.00, 95% CI [-0.03, 0.02]
Cognitive Ability Collabra journals conditional General Collabra 0.004 -0.006 0.018 No trend detected 0.00, 95% CI [-0.01, 0.02]
Cognitive Ability JEP:G journals conditional General JEP:G -0.002 -0.012 0.011 No trend detected -0.00, 95% CI [-0.01, 0.01]
Cognitive Ability NHB journals conditional General NHB -0.009 -0.020 -0.003 Decreasing -0.01, 95% CI [-0.02, -0.00]
Cognitive Ability PLOSONE journals conditional General PLOSONE 0.025 0.010 0.047 Increasing 0.03, 95% CI [0.01, 0.05]
Cognitive Ability PS journals conditional General PS 0.001 -0.003 0.007 No trend detected 0.00, 95% CI [-0.00, 0.01]
Cognitive Ability Clinical subfields conditional Clinical hypothetical typical journal 0.003 -0.025 0.031 No trend detected 0.00, 95% CI [-0.03, 0.03]
Cognitive Ability BRAT journals conditional Clinical BRAT 0.001 -0.004 0.005 No trend detected 0.00, 95% CI [-0.00, 0.01]
Cognitive Ability CPS journals conditional Clinical CPS 0.003 -0.011 0.015 No trend detected 0.00, 95% CI [-0.01, 0.01]
Cognitive Ability JCCAP journals conditional Clinical JCCAP 0.006 0.002 0.013 Increasing 0.01, 95% CI [0.00, 0.01]
Cognitive Ability JCCP journals conditional Clinical JCCP 0.007 -0.001 0.018 No trend detected 0.01, 95% CI [-0.00, 0.02]
Cognitive Ability JPCS journals conditional Clinical JPCS 0.011 -0.002 0.023 No trend detected 0.01, 95% CI [-0.00, 0.02]
Cognitive Ability Cognitive subfields conditional Cognitive hypothetical typical journal 0.002 -0.026 0.031 No trend detected 0.00, 95% CI [-0.03, 0.03]
Cognitive Ability Cognition journals conditional Cognitive Cognition 0.011 0.002 0.026 Increasing 0.01, 95% CI [0.00, 0.03]
Cognitive Ability JEP:HPP journals conditional Cognitive JEP:HPP -0.002 -0.018 0.014 No trend detected -0.00, 95% CI [-0.02, 0.01]
Cognitive Ability JEP:LMC journals conditional Cognitive JEP:LMC -0.001 -0.008 0.005 No trend detected -0.00, 95% CI [-0.01, 0.01]
Cognitive Ability JML journals conditional Cognitive JML 0.008 -0.010 0.032 No trend detected 0.01, 95% CI [-0.01, 0.03]
Cognitive Ability M&C journals conditional Cognitive M&C 0.003 -0.014 0.017 No trend detected 0.00, 95% CI [-0.01, 0.02]
Cognitive Ability Developmental subfields conditional Developmental hypothetical typical journal 0.001 -0.032 0.026 No trend detected 0.00, 95% CI [-0.03, 0.03]
Cognitive Ability CD journals conditional Developmental CD 0.004 -0.005 0.015 No trend detected 0.00, 95% CI [-0.01, 0.01]
Cognitive Ability DP journals conditional Developmental DP 0.000 -0.009 0.007 No trend detected -0.00, 95% CI [-0.01, 0.01]
Cognitive Ability JECP journals conditional Developmental JECP -0.008 -0.020 0.000 Decreasing -0.01, 95% CI [-0.02, -0.00]
Cognitive Ability JRA journals conditional Developmental JRA 0.005 -0.015 0.023 No trend detected 0.00, 95% CI [-0.01, 0.02]
Cognitive Ability PA journals conditional Developmental PA 0.005 -0.004 0.017 No trend detected 0.00, 95% CI [-0.00, 0.02]
Cognitive Ability Industrial & Organizational subfields conditional Industrial & Organizational hypothetical typical journal 0.001 -0.031 0.029 No trend detected 0.00, 95% CI [-0.03, 0.03]
Cognitive Ability JAP journals conditional Industrial & Organizational JAP -0.009 -0.029 0.013 No trend detected -0.01, 95% CI [-0.03, 0.01]
Cognitive Ability JEP:A journals conditional Industrial & Organizational JEP:A -0.006 -0.036 0.016 No trend detected -0.01, 95% CI [-0.04, 0.02]
Cognitive Ability JOB journals conditional Industrial & Organizational JOB 0.001 -0.005 0.008 No trend detected 0.00, 95% CI [-0.01, 0.01]
Cognitive Ability OBHDP journals conditional Industrial & Organizational OBHDP 0.005 -0.007 0.021 No trend detected 0.01, 95% CI [-0.01, 0.02]
Cognitive Ability PP journals conditional Industrial & Organizational PP -0.008 -0.034 0.008 No trend detected -0.01, 95% CI [-0.03, 0.01]
Cognitive Ability Social & Personality subfields conditional Social & Personality hypothetical typical journal 0.002 -0.030 0.030 No trend detected 0.00, 95% CI [-0.03, 0.03]
Cognitive Ability Emotion journals conditional Social & Personality Emotion -0.031 -0.059 -0.008 Decreasing -0.03, 95% CI [-0.06, -0.01]
Cognitive Ability JESP journals conditional Social & Personality JESP 0.000 -0.013 0.009 No trend detected -0.00, 95% CI [-0.01, 0.01]
Cognitive Ability JPSP journals conditional Social & Personality JPSP 0.001 -0.006 0.015 No trend detected 0.00, 95% CI [-0.01, 0.02]
Cognitive Ability JRP journals conditional Social & Personality JRP 0.009 0.002 0.020 Increasing 0.01, 95% CI [0.00, 0.02]
Cognitive Ability PSPB journals conditional Social & Personality PSPB -0.001 -0.018 0.021 No trend detected -0.00, 95% CI [-0.02, 0.02]
Neuro/Bio/Psychophys Psychology (marginal) field marginal across field across field 0.002 -0.008 0.012 No trend detected 0.00, 95% CI [-0.01, 0.01]
Neuro/Bio/Psychophys Psychology (conditional) field conditional hypothetical typical subfield hypothetical typical journal 0.002 -0.029 0.037 No trend detected 0.00, 95% CI [-0.03, 0.04]
Neuro/Bio/Psychophys General subfields conditional General hypothetical typical journal 0.004 -0.030 0.044 No trend detected 0.00, 95% CI [-0.03, 0.04]
Neuro/Bio/Psychophys Collabra journals conditional General Collabra 0.022 -0.001 0.051 No trend detected 0.02, 95% CI [-0.00, 0.05]
Neuro/Bio/Psychophys JEP:G journals conditional General JEP:G 0.000 -0.022 0.026 No trend detected 0.00, 95% CI [-0.02, 0.03]
Neuro/Bio/Psychophys NHB journals conditional General NHB 0.020 0.001 0.044 Increasing 0.02, 95% CI [0.00, 0.04]
Neuro/Bio/Psychophys PLOSONE journals conditional General PLOSONE 0.026 0.004 0.051 Increasing 0.03, 95% CI [0.00, 0.05]
Neuro/Bio/Psychophys PS journals conditional General PS -0.003 -0.014 0.009 No trend detected -0.00, 95% CI [-0.01, 0.01]
Neuro/Bio/Psychophys Clinical subfields conditional Clinical hypothetical typical journal 0.004 -0.026 0.038 No trend detected 0.00, 95% CI [-0.03, 0.04]
Neuro/Bio/Psychophys BRAT journals conditional Clinical BRAT 0.019 0.003 0.037 Increasing 0.02, 95% CI [0.00, 0.04]
Neuro/Bio/Psychophys CPS journals conditional Clinical CPS 0.015 0.000 0.030 Increasing 0.01, 95% CI [0.00, 0.03]
Neuro/Bio/Psychophys JCCAP journals conditional Clinical JCCAP 0.006 0.001 0.013 Increasing 0.01, 95% CI [0.00, 0.01]
Neuro/Bio/Psychophys JCCP journals conditional Clinical JCCP 0.008 0.000 0.021 Increasing 0.01, 95% CI [0.00, 0.02]
Neuro/Bio/Psychophys JPCS journals conditional Clinical JPCS -0.013 -0.030 -0.002 Decreasing -0.01, 95% CI [-0.03, -0.00]
Neuro/Bio/Psychophys Cognitive subfields conditional Cognitive hypothetical typical journal 0.002 -0.027 0.035 No trend detected 0.00, 95% CI [-0.03, 0.03]
Neuro/Bio/Psychophys Cognition journals conditional Cognitive Cognition 0.000 -0.006 0.008 No trend detected 0.00, 95% CI [-0.01, 0.01]
Neuro/Bio/Psychophys JEP:HPP journals conditional Cognitive JEP:HPP -0.008 -0.025 0.004 No trend detected -0.01, 95% CI [-0.03, 0.00]
Neuro/Bio/Psychophys JEP:LMC journals conditional Cognitive JEP:LMC 0.006 -0.006 0.020 No trend detected 0.01, 95% CI [-0.01, 0.02]
Neuro/Bio/Psychophys JML journals conditional Cognitive JML 0.014 -0.005 0.042 No trend detected 0.01, 95% CI [-0.01, 0.04]
Neuro/Bio/Psychophys M&C journals conditional Cognitive M&C 0.003 -0.036 0.036 No trend detected 0.00, 95% CI [-0.04, 0.04]
Neuro/Bio/Psychophys Developmental subfields conditional Developmental hypothetical typical journal 0.000 -0.032 0.030 No trend detected 0.00, 95% CI [-0.03, 0.03]
Neuro/Bio/Psychophys CD journals conditional Developmental CD 0.005 -0.006 0.017 No trend detected 0.01, 95% CI [-0.01, 0.02]
Neuro/Bio/Psychophys DP journals conditional Developmental DP -0.011 -0.033 0.010 No trend detected -0.01, 95% CI [-0.03, 0.01]
Neuro/Bio/Psychophys JECP journals conditional Developmental JECP 0.000 -0.006 0.006 No trend detected -0.00, 95% CI [-0.01, 0.01]
Neuro/Bio/Psychophys JRA journals conditional Developmental JRA -0.011 -0.045 0.015 No trend detected -0.01, 95% CI [-0.05, 0.01]
Neuro/Bio/Psychophys PA journals conditional Developmental PA -0.007 -0.022 0.003 No trend detected -0.01, 95% CI [-0.02, 0.00]
Neuro/Bio/Psychophys Industrial & Organizational subfields conditional Industrial & Organizational hypothetical typical journal 0.001 -0.032 0.037 No trend detected 0.00, 95% CI [-0.03, 0.04]
Neuro/Bio/Psychophys JAP journals conditional Industrial & Organizational JAP 0.010 -0.001 0.030 No trend detected 0.01, 95% CI [-0.00, 0.03]
Neuro/Bio/Psychophys JEP:A journals conditional Industrial & Organizational JEP:A -0.009 -0.042 0.017 No trend detected -0.01, 95% CI [-0.04, 0.02]
Neuro/Bio/Psychophys JOB journals conditional Industrial & Organizational JOB -0.005 -0.023 0.012 No trend detected -0.01, 95% CI [-0.02, 0.01]
Neuro/Bio/Psychophys OBHDP journals conditional Industrial & Organizational OBHDP 0.000 -0.031 0.022 No trend detected 0.00, 95% CI [-0.03, 0.02]
Neuro/Bio/Psychophys PP journals conditional Industrial & Organizational PP -0.007 -0.045 0.022 No trend detected -0.01, 95% CI [-0.05, 0.02]
Neuro/Bio/Psychophys Social & Personality subfields conditional Social & Personality hypothetical typical journal 0.002 -0.026 0.036 No trend detected 0.00, 95% CI [-0.03, 0.04]
Neuro/Bio/Psychophys Emotion journals conditional Social & Personality Emotion 0.000 -0.009 0.006 No trend detected -0.00, 95% CI [-0.01, 0.01]
Neuro/Bio/Psychophys JESP journals conditional Social & Personality JESP 0.001 -0.010 0.011 No trend detected 0.00, 95% CI [-0.01, 0.01]
Neuro/Bio/Psychophys JPSP journals conditional Social & Personality JPSP 0.010 -0.008 0.047 No trend detected 0.01, 95% CI [-0.01, 0.05]
Neuro/Bio/Psychophys JRP journals conditional Social & Personality JRP 0.003 -0.017 0.022 No trend detected 0.00, 95% CI [-0.02, 0.02]
Neuro/Bio/Psychophys PSPB journals conditional Social & Personality PSPB -0.001 -0.023 0.024 No trend detected -0.00, 95% CI [-0.02, 0.02]
Self-Report about Subjective States Psychology (marginal) field marginal across field across field 0.005 -0.007 0.019 No trend detected 0.00, 95% CI [-0.01, 0.02]
Self-Report about Subjective States Psychology (conditional) field conditional hypothetical typical subfield hypothetical typical journal 0.002 -0.022 0.038 No trend detected 0.00, 95% CI [-0.02, 0.04]
Self-Report about Subjective States General subfields conditional General hypothetical typical journal 0.001 -0.010 0.011 No trend detected 0.00, 95% CI [-0.01, 0.01]
Self-Report about Subjective States Collabra journals conditional General Collabra 0.000 -0.003 0.003 No trend detected 0.00, 95% CI [-0.00, 0.00]
Self-Report about Subjective States JEP:G journals conditional General JEP:G 0.001 -0.002 0.005 No trend detected 0.00, 95% CI [-0.00, 0.00]
Self-Report about Subjective States NHB journals conditional General NHB -0.005 -0.026 0.009 No trend detected -0.00, 95% CI [-0.03, 0.01]
Self-Report about Subjective States PLOSONE journals conditional General PLOSONE 0.005 -0.002 0.014 No trend detected 0.00, 95% CI [-0.00, 0.01]
Self-Report about Subjective States PS journals conditional General PS 0.000 -0.003 0.003 No trend detected 0.00, 95% CI [-0.00, 0.00]
Self-Report about Subjective States Clinical subfields conditional Clinical hypothetical typical journal 0.001 -0.015 0.018 No trend detected 0.00, 95% CI [-0.01, 0.02]
Self-Report about Subjective States BRAT journals conditional Clinical BRAT 0.003 -0.004 0.013 No trend detected 0.00, 95% CI [-0.00, 0.01]
Self-Report about Subjective States CPS journals conditional Clinical CPS 0.000 -0.003 0.005 No trend detected 0.00, 95% CI [-0.00, 0.00]
Self-Report about Subjective States JCCAP journals conditional Clinical JCCAP 0.001 -0.002 0.007 No trend detected 0.00, 95% CI [-0.00, 0.01]
Self-Report about Subjective States JCCP journals conditional Clinical JCCP 0.002 -0.016 0.019 No trend detected 0.00, 95% CI [-0.02, 0.02]
Self-Report about Subjective States JPCS journals conditional Clinical JPCS 0.001 -0.008 0.010 No trend detected 0.00, 95% CI [-0.01, 0.01]
Self-Report about Subjective States Cognitive subfields conditional Cognitive hypothetical typical journal 0.000 -0.027 0.018 No trend detected -0.00, 95% CI [-0.03, 0.02]
Self-Report about Subjective States Cognition journals conditional Cognitive Cognition -0.001 -0.013 0.009 No trend detected -0.00, 95% CI [-0.01, 0.01]
Self-Report about Subjective States JEP:HPP journals conditional Cognitive JEP:HPP -0.003 -0.025 0.012 No trend detected -0.00, 95% CI [-0.02, 0.01]
Self-Report about Subjective States JEP:LMC journals conditional Cognitive JEP:LMC -0.006 -0.021 0.004 No trend detected -0.01, 95% CI [-0.02, 0.00]
Self-Report about Subjective States JML journals conditional Cognitive JML 0.002 -0.010 0.017 No trend detected 0.00, 95% CI [-0.01, 0.02]
Self-Report about Subjective States M&C journals conditional Cognitive M&C 0.000 -0.011 0.014 No trend detected 0.00, 95% CI [-0.01, 0.01]
Self-Report about Subjective States Developmental subfields conditional Developmental hypothetical typical journal 0.013 -0.019 0.052 No trend detected 0.01, 95% CI [-0.02, 0.05]
Self-Report about Subjective States CD journals conditional Developmental CD 0.018 0.001 0.043 Increasing 0.02, 95% CI [0.00, 0.04]
Self-Report about Subjective States DP journals conditional Developmental DP 0.019 0.001 0.045 Increasing 0.02, 95% CI [0.00, 0.05]
Self-Report about Subjective States JECP journals conditional Developmental JECP 0.018 -0.002 0.039 No trend detected 0.02, 95% CI [-0.00, 0.04]
Self-Report about Subjective States JRA journals conditional Developmental JRA 0.026 0.004 0.067 Increasing 0.03, 95% CI [0.00, 0.07]
Self-Report about Subjective States PA journals conditional Developmental PA 0.006 -0.025 0.033 No trend detected 0.01, 95% CI [-0.03, 0.03]
Self-Report about Subjective States Industrial & Organizational subfields conditional Industrial & Organizational hypothetical typical journal 0.005 -0.030 0.041 No trend detected 0.00, 95% CI [-0.03, 0.04]
Self-Report about Subjective States JAP journals conditional Industrial & Organizational JAP 0.007 -0.012 0.028 No trend detected 0.01, 95% CI [-0.01, 0.03]
Self-Report about Subjective States JEP:A journals conditional Industrial & Organizational JEP:A 0.002 -0.026 0.028 No trend detected 0.00, 95% CI [-0.03, 0.03]
Self-Report about Subjective States JOB journals conditional Industrial & Organizational JOB 0.009 -0.015 0.034 No trend detected 0.01, 95% CI [-0.01, 0.03]
Self-Report about Subjective States OBHDP journals conditional Industrial & Organizational OBHDP 0.002 -0.022 0.025 No trend detected 0.00, 95% CI [-0.02, 0.02]
Self-Report about Subjective States PP journals conditional Industrial & Organizational PP -0.003 -0.043 0.028 No trend detected -0.00, 95% CI [-0.04, 0.03]
Self-Report about Subjective States Social & Personality subfields conditional Social & Personality hypothetical typical journal 0.006 -0.026 0.041 No trend detected 0.01, 95% CI [-0.03, 0.04]
Self-Report about Subjective States Emotion journals conditional Social & Personality Emotion 0.009 -0.014 0.033 No trend detected 0.01, 95% CI [-0.01, 0.03]
Self-Report about Subjective States JESP journals conditional Social & Personality JESP 0.006 -0.015 0.032 No trend detected 0.01, 95% CI [-0.01, 0.03]
Self-Report about Subjective States JPSP journals conditional Social & Personality JPSP 0.020 -0.005 0.057 No trend detected 0.02, 95% CI [-0.00, 0.06]
Self-Report about Subjective States JRP journals conditional Social & Personality JRP 0.003 -0.016 0.020 No trend detected 0.00, 95% CI [-0.02, 0.02]
Self-Report about Subjective States PSPB journals conditional Social & Personality PSPB 0.003 -0.010 0.015 No trend detected 0.00, 95% CI [-0.01, 0.01]
Self-Report about Behavior Psychology (marginal) field marginal across field across field -0.001 -0.013 0.010 No trend detected -0.00, 95% CI [-0.01, 0.01]
Self-Report about Behavior Psychology (conditional) field conditional hypothetical typical subfield hypothetical typical journal 0.000 -0.049 0.032 No trend detected -0.00, 95% CI [-0.05, 0.03]
Self-Report about Behavior General subfields conditional General hypothetical typical journal -0.003 -0.044 0.016 No trend detected -0.00, 95% CI [-0.04, 0.02]
Self-Report about Behavior Collabra journals conditional General Collabra 0.008 -0.003 0.024 No trend detected 0.01, 95% CI [-0.00, 0.02]
Self-Report about Behavior JEP:G journals conditional General JEP:G -0.036 -0.058 -0.020 Decreasing -0.04, 95% CI [-0.06, -0.02]
Self-Report about Behavior NHB journals conditional General NHB 0.000 -0.004 0.007 No trend detected 0.00, 95% CI [-0.00, 0.01]
Self-Report about Behavior PLOSONE journals conditional General PLOSONE -0.008 -0.018 -0.003 Decreasing -0.01, 95% CI [-0.02, -0.00]
Self-Report about Behavior PS journals conditional General PS -0.010 -0.020 -0.003 Decreasing -0.01, 95% CI [-0.02, -0.00]
Self-Report about Behavior Clinical subfields conditional Clinical hypothetical typical journal 0.002 -0.042 0.033 No trend detected 0.00, 95% CI [-0.04, 0.03]
Self-Report about Behavior BRAT journals conditional Clinical BRAT 0.002 -0.013 0.018 No trend detected 0.00, 95% CI [-0.01, 0.02]
Self-Report about Behavior CPS journals conditional Clinical CPS 0.008 0.002 0.017 Increasing 0.01, 95% CI [0.00, 0.02]
Self-Report about Behavior JCCAP journals conditional Clinical JCCAP 0.001 -0.012 0.010 No trend detected 0.00, 95% CI [-0.01, 0.01]
Self-Report about Behavior JCCP journals conditional Clinical JCCP 0.001 -0.005 0.008 No trend detected 0.00, 95% CI [-0.01, 0.01]
Self-Report about Behavior JPCS journals conditional Clinical JPCS 0.004 -0.012 0.017 No trend detected 0.00, 95% CI [-0.01, 0.02]
Self-Report about Behavior Cognitive subfields conditional Cognitive hypothetical typical journal 0.000 -0.056 0.038 No trend detected 0.00, 95% CI [-0.06, 0.04]
Self-Report about Behavior Cognition journals conditional Cognitive Cognition -0.003 -0.021 0.018 No trend detected -0.00, 95% CI [-0.02, 0.02]
Self-Report about Behavior JEP:HPP journals conditional Cognitive JEP:HPP -0.004 -0.027 0.019 No trend detected -0.00, 95% CI [-0.03, 0.02]
Self-Report about Behavior JEP:LMC journals conditional Cognitive JEP:LMC 0.010 -0.001 0.025 No trend detected 0.01, 95% CI [-0.00, 0.02]
Self-Report about Behavior JML journals conditional Cognitive JML 0.006 -0.017 0.030 No trend detected 0.01, 95% CI [-0.02, 0.03]
Self-Report about Behavior M&C journals conditional Cognitive M&C -0.011 -0.045 0.014 No trend detected -0.01, 95% CI [-0.05, 0.01]
Self-Report about Behavior Developmental subfields conditional Developmental hypothetical typical journal -0.002 -0.059 0.031 No trend detected -0.00, 95% CI [-0.06, 0.03]
Self-Report about Behavior CD journals conditional Developmental CD 0.009 -0.012 0.027 No trend detected 0.01, 95% CI [-0.01, 0.03]
Self-Report about Behavior DP journals conditional Developmental DP -0.026 -0.054 -0.004 Decreasing -0.03, 95% CI [-0.05, -0.00]
Self-Report about Behavior JECP journals conditional Developmental JECP 0.022 0.003 0.044 Increasing 0.02, 95% CI [0.00, 0.04]
Self-Report about Behavior JRA journals conditional Developmental JRA -0.041 -0.093 -0.013 Decreasing -0.04, 95% CI [-0.09, -0.01]
Self-Report about Behavior PA journals conditional Developmental PA -0.001 -0.016 0.012 No trend detected -0.00, 95% CI [-0.02, 0.01]
Self-Report about Behavior Industrial & Organizational subfields conditional Industrial & Organizational hypothetical typical journal 0.001 -0.037 0.027 No trend detected 0.00, 95% CI [-0.04, 0.03]
Self-Report about Behavior JAP journals conditional Industrial & Organizational JAP 0.002 -0.005 0.012 No trend detected 0.00, 95% CI [-0.01, 0.01]
Self-Report about Behavior JEP:A journals conditional Industrial & Organizational JEP:A 0.007 -0.003 0.023 No trend detected 0.01, 95% CI [-0.00, 0.02]
Self-Report about Behavior JOB journals conditional Industrial & Organizational JOB -0.002 -0.015 0.010 No trend detected -0.00, 95% CI [-0.01, 0.01]
Self-Report about Behavior OBHDP journals conditional Industrial & Organizational OBHDP 0.001 -0.027 0.019 No trend detected 0.00, 95% CI [-0.03, 0.02]
Self-Report about Behavior PP journals conditional Industrial & Organizational PP 0.000 -0.012 0.010 No trend detected 0.00, 95% CI [-0.01, 0.01]
Self-Report about Behavior Social & Personality subfields conditional Social & Personality hypothetical typical journal -0.001 -0.058 0.036 No trend detected -0.00, 95% CI [-0.06, 0.04]
Self-Report about Behavior Emotion journals conditional Social & Personality Emotion 0.004 -0.009 0.014 No trend detected 0.00, 95% CI [-0.01, 0.01]
Self-Report about Behavior JESP journals conditional Social & Personality JESP 0.011 -0.009 0.031 No trend detected 0.01, 95% CI [-0.01, 0.03]
Self-Report about Behavior JPSP journals conditional Social & Personality JPSP -0.014 -0.046 0.025 No trend detected -0.01, 95% CI [-0.05, 0.02]
Self-Report about Behavior JRP journals conditional Social & Personality JRP -0.016 -0.029 -0.006 Decreasing -0.02, 95% CI [-0.03, -0.01]
Self-Report about Behavior PSPB journals conditional Social & Personality PSPB 0.005 -0.015 0.029 No trend detected 0.00, 95% CI [-0.01, 0.03]
Behavioral Proxy Psychology (marginal) field marginal across field across field 0.002 -0.008 0.014 No trend detected 0.00, 95% CI [-0.01, 0.01]
Behavioral Proxy Psychology (conditional) field conditional hypothetical typical subfield hypothetical typical journal 0.001 -0.026 0.036 No trend detected 0.00, 95% CI [-0.03, 0.04]
Behavioral Proxy General subfields conditional General hypothetical typical journal -0.003 -0.039 0.016 No trend detected -0.00, 95% CI [-0.04, 0.02]
Behavioral Proxy Collabra journals conditional General Collabra -0.010 -0.021 0.003 No trend detected -0.01, 95% CI [-0.02, 0.00]
Behavioral Proxy JEP:G journals conditional General JEP:G -0.009 -0.023 0.008 No trend detected -0.01, 95% CI [-0.02, 0.01]
Behavioral Proxy NHB journals conditional General NHB -0.008 -0.017 0.000 Decreasing -0.01, 95% CI [-0.02, -0.00]
Behavioral Proxy PLOSONE journals conditional General PLOSONE 0.000 -0.005 0.004 No trend detected -0.00, 95% CI [-0.00, 0.00]
Behavioral Proxy PS journals conditional General PS -0.006 -0.016 0.003 No trend detected -0.01, 95% CI [-0.02, 0.00]
Behavioral Proxy Clinical subfields conditional Clinical hypothetical typical journal 0.008 -0.007 0.052 No trend detected 0.01, 95% CI [-0.01, 0.05]
Behavioral Proxy BRAT journals conditional Clinical BRAT 0.037 0.015 0.062 Increasing 0.04, 95% CI [0.01, 0.06]
Behavioral Proxy CPS journals conditional Clinical CPS 0.004 -0.004 0.013 No trend detected 0.00, 95% CI [-0.00, 0.01]
Behavioral Proxy JCCAP journals conditional Clinical JCCAP 0.012 0.004 0.022 Increasing 0.01, 95% CI [0.00, 0.02]
Behavioral Proxy JCCP journals conditional Clinical JCCP 0.008 0.002 0.020 Increasing 0.01, 95% CI [0.00, 0.02]
Behavioral Proxy JPCS journals conditional Clinical JPCS 0.007 0.002 0.016 Increasing 0.01, 95% CI [0.00, 0.02]
Behavioral Proxy Cognitive subfields conditional Cognitive hypothetical typical journal 0.002 -0.020 0.032 No trend detected 0.00, 95% CI [-0.02, 0.03]
Behavioral Proxy Cognition journals conditional Cognitive Cognition 0.010 0.001 0.026 Increasing 0.01, 95% CI [0.00, 0.03]
Behavioral Proxy JEP:HPP journals conditional Cognitive JEP:HPP 0.002 -0.004 0.013 No trend detected 0.00, 95% CI [-0.00, 0.01]
Behavioral Proxy JEP:LMC journals conditional Cognitive JEP:LMC 0.006 -0.010 0.023 No trend detected 0.01, 95% CI [-0.01, 0.02]
Behavioral Proxy JML journals conditional Cognitive JML 0.000 -0.016 0.014 No trend detected -0.00, 95% CI [-0.02, 0.01]
Behavioral Proxy M&C journals conditional Cognitive M&C -0.005 -0.039 0.015 No trend detected -0.00, 95% CI [-0.04, 0.02]
Behavioral Proxy Developmental subfields conditional Developmental hypothetical typical journal -0.001 -0.036 0.020 No trend detected -0.00, 95% CI [-0.04, 0.02]
Behavioral Proxy CD journals conditional Developmental CD -0.003 -0.018 0.008 No trend detected -0.00, 95% CI [-0.02, 0.01]
Behavioral Proxy DP journals conditional Developmental DP -0.011 -0.032 0.007 No trend detected -0.01, 95% CI [-0.03, 0.01]
Behavioral Proxy JECP journals conditional Developmental JECP 0.000 -0.005 0.007 No trend detected 0.00, 95% CI [-0.01, 0.01]
Behavioral Proxy JRA journals conditional Developmental JRA -0.001 -0.028 0.021 No trend detected -0.00, 95% CI [-0.03, 0.02]
Behavioral Proxy PA journals conditional Developmental PA 0.007 -0.014 0.029 No trend detected 0.01, 95% CI [-0.01, 0.03]
Behavioral Proxy Industrial & Organizational subfields conditional Industrial & Organizational hypothetical typical journal 0.001 -0.024 0.026 No trend detected 0.00, 95% CI [-0.02, 0.03]
Behavioral Proxy JAP journals conditional Industrial & Organizational JAP 0.000 -0.004 0.007 No trend detected 0.00, 95% CI [-0.00, 0.01]
Behavioral Proxy JEP:A journals conditional Industrial & Organizational JEP:A 0.000 -0.008 0.007 No trend detected 0.00, 95% CI [-0.01, 0.01]
Behavioral Proxy JOB journals conditional Industrial & Organizational JOB 0.009 -0.007 0.028 No trend detected 0.01, 95% CI [-0.01, 0.03]
Behavioral Proxy OBHDP journals conditional Industrial & Organizational OBHDP -0.001 -0.040 0.020 No trend detected -0.00, 95% CI [-0.04, 0.02]
Behavioral Proxy PP journals conditional Industrial & Organizational PP 0.000 -0.010 0.007 No trend detected 0.00, 95% CI [-0.01, 0.01]
Behavioral Proxy Social & Personality subfields conditional Social & Personality hypothetical typical journal 0.003 -0.015 0.034 No trend detected 0.00, 95% CI [-0.02, 0.03]
Behavioral Proxy Emotion journals conditional Social & Personality Emotion 0.005 0.001 0.013 Increasing 0.01, 95% CI [0.00, 0.01]
Behavioral Proxy JESP journals conditional Social & Personality JESP 0.002 -0.005 0.010 No trend detected 0.00, 95% CI [-0.00, 0.01]
Behavioral Proxy JPSP journals conditional Social & Personality JPSP 0.010 -0.025 0.053 No trend detected 0.01, 95% CI [-0.03, 0.05]
Behavioral Proxy JRP journals conditional Social & Personality JRP 0.001 -0.004 0.007 No trend detected 0.00, 95% CI [-0.00, 0.01]
Behavioral Proxy PSPB journals conditional Social & Personality PSPB 0.001 -0.004 0.009 No trend detected 0.00, 95% CI [-0.00, 0.01]
Direct Behavioral Psychology (marginal) field marginal across field across field -0.001 -0.009 0.003 No trend detected -0.00, 95% CI [-0.01, 0.00]
Direct Behavioral Psychology (conditional) field conditional hypothetical typical subfield hypothetical typical journal 0.000 -0.018 0.015 No trend detected -0.00, 95% CI [-0.02, 0.01]
Direct Behavioral General subfields conditional General hypothetical typical journal 0.000 -0.016 0.014 No trend detected -0.00, 95% CI [-0.02, 0.01]
Direct Behavioral Collabra journals conditional General Collabra 0.002 -0.007 0.016 No trend detected 0.00, 95% CI [-0.01, 0.02]
Direct Behavioral JEP:G journals conditional General JEP:G 0.000 -0.003 0.005 No trend detected 0.00, 95% CI [-0.00, 0.01]
Direct Behavioral NHB journals conditional General NHB -0.002 -0.011 0.000 Decreasing -0.00, 95% CI [-0.01, -0.00]
Direct Behavioral PLOSONE journals conditional General PLOSONE 0.000 -0.002 0.003 No trend detected 0.00, 95% CI [-0.00, 0.00]
Direct Behavioral PS journals conditional General PS 0.005 0.000 0.015 Increasing 0.00, 95% CI [0.00, 0.01]
Direct Behavioral Clinical subfields conditional Clinical hypothetical typical journal 0.000 -0.015 0.013 No trend detected -0.00, 95% CI [-0.01, 0.01]
Direct Behavioral BRAT journals conditional Clinical BRAT -0.003 -0.014 0.006 No trend detected -0.00, 95% CI [-0.01, 0.01]
Direct Behavioral CPS journals conditional Clinical CPS 0.000 -0.004 0.003 No trend detected -0.00, 95% CI [-0.00, 0.00]
Direct Behavioral JCCAP journals conditional Clinical JCCAP 0.005 0.001 0.015 Increasing 0.01, 95% CI [0.00, 0.02]
Direct Behavioral JCCP journals conditional Clinical JCCP 0.000 -0.003 0.002 No trend detected -0.00, 95% CI [-0.00, 0.00]
Direct Behavioral JPCS journals conditional Clinical JPCS 0.000 -0.005 0.003 No trend detected -0.00, 95% CI [-0.00, 0.00]
Direct Behavioral Cognitive subfields conditional Cognitive hypothetical typical journal 0.000 -0.019 0.014 No trend detected -0.00, 95% CI [-0.02, 0.01]
Direct Behavioral Cognition journals conditional Cognitive Cognition 0.007 0.001 0.022 Increasing 0.01, 95% CI [0.00, 0.02]
Direct Behavioral JEP:HPP journals conditional Cognitive JEP:HPP -0.011 -0.031 -0.002 Decreasing -0.01, 95% CI [-0.03, -0.00]
Direct Behavioral JEP:LMC journals conditional Cognitive JEP:LMC -0.007 -0.019 -0.001 Decreasing -0.01, 95% CI [-0.02, -0.00]
Direct Behavioral JML journals conditional Cognitive JML 0.000 -0.007 0.006 No trend detected -0.00, 95% CI [-0.01, 0.01]
Direct Behavioral M&C journals conditional Cognitive M&C -0.001 -0.011 0.004 No trend detected -0.00, 95% CI [-0.01, 0.00]
Direct Behavioral Developmental subfields conditional Developmental hypothetical typical journal 0.000 -0.025 0.023 No trend detected -0.00, 95% CI [-0.02, 0.02]
Direct Behavioral CD journals conditional Developmental CD 0.005 0.000 0.015 Increasing 0.01, 95% CI [0.00, 0.02]
Direct Behavioral DP journals conditional Developmental DP -0.006 -0.020 0.001 No trend detected -0.01, 95% CI [-0.02, 0.00]
Direct Behavioral JECP journals conditional Developmental JECP 0.000 -0.011 0.012 No trend detected -0.00, 95% CI [-0.01, 0.01]
Direct Behavioral JRA journals conditional Developmental JRA 0.000 -0.009 0.006 No trend detected -0.00, 95% CI [-0.01, 0.01]
Direct Behavioral PA journals conditional Developmental PA 0.005 0.000 0.018 No trend detected 0.01, 95% CI [-0.00, 0.02]
Direct Behavioral Industrial & Organizational subfields conditional Industrial & Organizational hypothetical typical journal 0.000 -0.020 0.013 No trend detected -0.00, 95% CI [-0.02, 0.01]
Direct Behavioral JAP journals conditional Industrial & Organizational JAP 0.000 -0.004 0.003 No trend detected -0.00, 95% CI [-0.00, 0.00]
Direct Behavioral JEP:A journals conditional Industrial & Organizational JEP:A -0.001 -0.010 0.003 No trend detected -0.00, 95% CI [-0.01, 0.00]
Direct Behavioral JOB journals conditional Industrial & Organizational JOB 0.000 -0.005 0.004 No trend detected -0.00, 95% CI [-0.00, 0.00]
Direct Behavioral OBHDP journals conditional Industrial & Organizational OBHDP 0.002 -0.019 0.016 No trend detected 0.00, 95% CI [-0.02, 0.02]
Direct Behavioral PP journals conditional Industrial & Organizational PP -0.006 -0.028 0.000 Decreasing -0.01, 95% CI [-0.03, -0.00]
Direct Behavioral Social & Personality subfields conditional Social & Personality hypothetical typical journal 0.000 -0.019 0.013 No trend detected -0.00, 95% CI [-0.02, 0.01]
Direct Behavioral Emotion journals conditional Social & Personality Emotion -0.004 -0.015 0.000 Decreasing -0.00, 95% CI [-0.02, -0.00]
Direct Behavioral JESP journals conditional Social & Personality JESP 0.000 -0.008 0.005 No trend detected -0.00, 95% CI [-0.01, 0.01]
Direct Behavioral JPSP journals conditional Social & Personality JPSP 0.000 -0.007 0.013 No trend detected 0.00, 95% CI [-0.01, 0.01]
Direct Behavioral JRP journals conditional Social & Personality JRP 0.000 -0.003 0.002 No trend detected -0.00, 95% CI [-0.00, 0.00]
Direct Behavioral PSPB journals conditional Social & Personality PSPB -0.004 -0.014 0.004 No trend detected -0.00, 95% CI [-0.01, 0.00]

Plot field + subfields

# show_col(viridis::mako(25))
# viridis::mako(25)

p_trend_subfields <- posterior_trends |>
  filter(re_level != "journals") |>
  mutate(label = fct_relevel(label,
                             "Psychology (marginal)",
                             "Psychology (conditional)",
                             "General",
                             "Clinical",
                             "Cognitive",
                             "Developmental",
                             "Industrial & Organizational",
                             "Social & Personality")) |>
  ggplot(aes(trend_estimate, outcome, color = trend_category)) +
  geom_vline(xintercept = 0, linetype = "dotted") +
  geom_vline(xintercept = 0, linetype = "dotted") +
  geom_linerangeh(aes(xmin = trend_ci_lower, xmax = trend_ci_upper)) +
  geom_point() +
  #coord_cartesian(xlim = c(-.1, .1)) +
  theme_linedraw() +
  ylab("") +
  xlab("Trend (change per year)") +
  scale_x_continuous(labels = scales::label_percent(), breaks = breaks_pretty()) +
  scale_color_manual(values = c("#38629DFF", "#2B1C35FF", "#359EAAFF")) +
  guides(color = guide_legend(title = "Trend",
                              reverse = TRUE)) +
  facet_wrap(~ label, ncol = 2)

p_trend_subfields

quicksave("p_trend_subfields", 11, 6)

Plot journals

p_trend_journals <- posterior_trends |>
  filter(re_level == "journals") |>
  mutate(label = fct_relevel(label, subfield_and_journal_labels_without_subfields),
         label = fct_rev(label)) |>
  ggplot(aes(trend_estimate, label, color = subfield)) + # color = trend_category, 
  geom_vline(xintercept = 0, linetype = "dotted") +
  geom_linerangeh(aes(xmin = trend_ci_lower, xmax = trend_ci_upper), position = position_dodge(width = .8)) +
  geom_point(position = position_dodge(width = .8)) +
  #coord_cartesian(xlim = c(-.1, .1)) +
  theme_linedraw() +
  ylab("") +
  xlab("Trend (change per year)") +
  scale_x_continuous(labels = scales::label_percent(), breaks = breaks_pretty()) +
  #scale_color_manual(values = c("#38629DFF", "#2B1C35FF", "#359EAAFF")) +
  guides(color = guide_legend(title = "Trend")) +
  facet_wrap(~ outcome, ncol = 3)

p_trend_journals

quicksave("p_trend_journals", 12, 10)

Combined table with summary conclusions

categorical conclusions for field, subfield, and journal levels based on prevalence category and trend (detectably increasing/decreasing, no detectable change)

# join and clean up
posterior_prevalence_and_trends <- 
  full_join(posterior_prevalence, 
            posterior_trends,
            by = c("outcome", "label", "re_level", "type", "subfield", "journal")) |>
  mutate(prevalence_estimate = rnd(prevalence_estimate),
         prevalence_interval = paste0(rnd(prevalence_ci_lower), ", ", rnd(prevalence_ci_upper)),
         trend_estimate = rnd(trend_estimate),
         trend_interval = paste0(rnd(trend_ci_lower), ", ", rnd(trend_ci_upper))) |>
  select(re_level, label, outcome, 
         prevalence_estimate, prevalence_interval, prevalence_category, 
         trend_estimate, trend_interval, trend_category) |>
  arrange(desc(label), desc(outcome))

# save to disk
posterior_prevalence_and_trends |>
  filter(re_level %in% c("field", "subfields")) |>
  select(-re_level) |>
  write_csv("../../data/registered report/results/posterior_prevalence_and_trends_field_subfield.csv")

posterior_prevalence_and_trends |>
  filter(!re_level %in% c("field", "subfields")) |>
  select(-re_level) |>
  write_csv("../../data/registered report/results/posterior_prevalence_and_trends_journals.csv")

# print the table just for field and subfields
posterior_prevalence_and_trends |>
  filter(re_level %in% c("field", "subfields")) |>
  select(-re_level) |>
  kable() |>
  kable_classic(full_width = FALSE)
label outcome prevalence_estimate prevalence_interval prevalence_category trend_estimate trend_interval trend_category
Psychology (marginal) Direct Behavioral 0.01 0.01, 0.07 Rare -0.00 -0.01, 0.00 No trend detected
Psychology (marginal) Behavioral Proxy 0.05 0.03, 0.10 Uncommon 0.00 -0.01, 0.01 No trend detected
Psychology (marginal) Self-Report about Behavior 0.07 0.04, 0.15 Uncommon -0.00 -0.01, 0.01 No trend detected
Psychology (marginal) Self-Report about Subjective States 0.87 0.68, 0.94 Frequent 0.00 -0.01, 0.02 No trend detected
Psychology (marginal) Neuro/Bio/Psychophys 0.09 0.05, 0.16 Uncommon 0.00 -0.01, 0.01 No trend detected
Psychology (marginal) Cognitive Ability 0.05 0.03, 0.08 Rare 0.00 -0.00, 0.01 No trend detected
Psychology (conditional) Direct Behavioral 0.01 0.00, 0.09 Rare -0.00 -0.02, 0.01 No trend detected
Psychology (conditional) Behavioral Proxy 0.05 0.00, 0.30 Rare 0.00 -0.03, 0.04 No trend detected
Psychology (conditional) Self-Report about Behavior 0.07 0.01, 0.24 Uncommon -0.00 -0.05, 0.03 No trend detected
Psychology (conditional) Self-Report about Subjective States 0.89 0.41, 0.99 Frequent 0.00 -0.02, 0.04 No trend detected
Psychology (conditional) Neuro/Bio/Psychophys 0.10 0.01, 0.34 Uncommon 0.00 -0.03, 0.04 No trend detected
Psychology (conditional) Cognitive Ability 0.05 0.00, 0.22 Rare 0.00 -0.03, 0.03 No trend detected
General Direct Behavioral 0.01 0.00, 0.08 Rare -0.00 -0.02, 0.01 No trend detected
General Behavioral Proxy 0.05 0.00, 0.30 Rare -0.00 -0.04, 0.02 No trend detected
General Self-Report about Behavior 0.04 0.01, 0.16 Rare -0.00 -0.04, 0.02 No trend detected
General Self-Report about Subjective States 0.97 0.83, 1.00 Frequent 0.00 -0.01, 0.01 No trend detected
General Neuro/Bio/Psychophys 0.12 0.01, 0.39 Occasional 0.00 -0.03, 0.04 No trend detected
General Cognitive Ability 0.04 0.00, 0.22 Rare 0.00 -0.03, 0.02 No trend detected
Clinical Direct Behavioral 0.01 0.00, 0.08 Rare -0.00 -0.01, 0.01 No trend detected
Clinical Behavioral Proxy 0.05 0.00, 0.31 Uncommon 0.01 -0.01, 0.05 No trend detected
Clinical Self-Report about Behavior 0.06 0.01, 0.20 Uncommon 0.00 -0.04, 0.03 No trend detected
Clinical Self-Report about Subjective States 0.95 0.71, 0.99 Frequent 0.00 -0.01, 0.02 No trend detected
Clinical Neuro/Bio/Psychophys 0.09 0.01, 0.33 Uncommon 0.00 -0.03, 0.04 No trend detected
Clinical Cognitive Ability 0.05 0.00, 0.22 Rare 0.00 -0.03, 0.03 No trend detected
Cognitive Direct Behavioral 0.01 0.00, 0.09 Rare -0.00 -0.02, 0.01 No trend detected
Cognitive Behavioral Proxy 0.05 0.00, 0.32 Uncommon 0.00 -0.02, 0.03 No trend detected
Cognitive Self-Report about Behavior 0.09 0.01, 0.27 Uncommon 0.00 -0.06, 0.04 No trend detected
Cognitive Self-Report about Subjective States 0.93 0.62, 0.99 Frequent -0.00 -0.03, 0.02 No trend detected
Cognitive Neuro/Bio/Psychophys 0.09 0.01, 0.31 Uncommon 0.00 -0.03, 0.03 No trend detected
Cognitive Cognitive Ability 0.05 0.00, 0.22 Rare 0.00 -0.03, 0.03 No trend detected
Developmental Direct Behavioral 0.01 0.00, 0.13 Rare -0.00 -0.02, 0.02 No trend detected
Developmental Behavioral Proxy 0.05 0.00, 0.33 Uncommon -0.00 -0.04, 0.02 No trend detected
Developmental Self-Report about Behavior 0.09 0.01, 0.27 Uncommon -0.00 -0.06, 0.03 No trend detected
Developmental Self-Report about Subjective States 0.78 0.32, 0.96 Frequent 0.01 -0.02, 0.05 No trend detected
Developmental Neuro/Bio/Psychophys 0.08 0.01, 0.30 Uncommon 0.00 -0.03, 0.03 No trend detected
Developmental Cognitive Ability 0.05 0.00, 0.23 Rare 0.00 -0.03, 0.03 No trend detected
Industrial & Organizational Direct Behavioral 0.01 0.00, 0.08 Rare -0.00 -0.02, 0.01 No trend detected
Industrial & Organizational Behavioral Proxy 0.05 0.00, 0.29 Rare 0.00 -0.02, 0.03 No trend detected
Industrial & Organizational Self-Report about Behavior 0.05 0.01, 0.18 Rare 0.00 -0.04, 0.03 No trend detected
Industrial & Organizational Self-Report about Subjective States 0.78 0.33, 0.97 Frequent 0.00 -0.03, 0.04 No trend detected
Industrial & Organizational Neuro/Bio/Psychophys 0.10 0.01, 0.36 Occasional 0.00 -0.03, 0.04 No trend detected
Industrial & Organizational Cognitive Ability 0.05 0.00, 0.23 Rare 0.00 -0.03, 0.03 No trend detected
Social & Personality Direct Behavioral 0.01 0.00, 0.09 Rare -0.00 -0.02, 0.01 No trend detected
Social & Personality Behavioral Proxy 0.04 0.00, 0.29 Rare 0.00 -0.02, 0.03 No trend detected
Social & Personality Self-Report about Behavior 0.09 0.01, 0.29 Uncommon -0.00 -0.06, 0.04 No trend detected
Social & Personality Self-Report about Subjective States 0.80 0.37, 0.97 Frequent 0.01 -0.03, 0.04 No trend detected
Social & Personality Neuro/Bio/Psychophys 0.09 0.01, 0.32 Uncommon 0.00 -0.03, 0.04 No trend detected
Social & Personality Cognitive Ability 0.05 0.00, 0.23 Rare 0.00 -0.03, 0.03 No trend detected

Correlations among the random effects

At the level of journals.

Prevalence

# extract correlations/covariances among the random effects
var_cors <- VarCorr(fitted_model)

# wrangle
var_cors_journal <- var_cors$`subfield:journal`$cor |>
  as.data.frame() |>
  rownames_to_column(var = "var")

var_cors_journal_intercept <- var_cors_journal |>
  filter(str_detect(var, "Intercept")) |>
  select(var, contains("Intercept") & contains("Estimate.")) |>
  mutate(var = str_remove(var, "_Intercept")) %>%
  rename_with(~ str_remove(., "Estimate.")) %>%
  rename_with(~ str_remove(., "_Intercept"))

# show_col(viridis::mako(25))
# viridis::mako(25)

# plot
cors_journal_intercept <- var_cors_journal_intercept |>
  rename(outcome = var,
         "Direct Behavioral" = directbehavioral, 
         "Behavioral Proxy" = behavioralproxy, 
         "Self-Report about Behavior" = selfreportsaboutbehavior, 
         "Self-Report about Subjective States" = selfreportaboutsubjectivestate, 
         "Neuro/Bio/Psychophys" = neurobiopsychophys, 
         "Cognitive Ability" = cognitiveability) |>
  mutate(outcome = case_when(outcome == "directbehavioral" ~ "Direct Behavioral",       
                             outcome == "behavioralproxy" ~ "Behavioral Proxy",
                             outcome == "selfreportsaboutbehavior" ~ "Self-Report about Behavior",
                             outcome == "selfreportaboutsubjectivestate" ~ "Self-Report about Subjective States",
                             outcome == "neurobiopsychophys" ~ "Neuro/Bio/Psychophys",
                             outcome == "cognitiveability" ~ "Cognitive Ability")) 

cors_journal_intercept |>
  mutate_if(is.numeric, rnd) |>
  write_csv("../../data/registered report/results/cors_journal_intercept.csv")

# table
cors_journal_intercept |>
  mutate_if(is.numeric, rnd) |>
  kable(caption = "Correlations among random effects for prevalence at the journal level") |>
  kable_classic(full_width = FALSE)
Correlations among random effects for prevalence at the journal level
outcome Direct Behavioral Behavioral Proxy Self-Report about Behavior Self-Report about Subjective States Neuro/Bio/Psychophys Cognitive Ability
Direct Behavioral 1.00 0.16 0.29 0.21 -0.02 -0.14
Behavioral Proxy 0.16 1.00 0.19 0.05 0.15 -0.31
Self-Report about Behavior 0.29 0.19 1.00 0.29 0.03 -0.06
Self-Report about Subjective States 0.21 0.05 0.29 1.00 0.13 0.03
Neuro/Bio/Psychophys -0.02 0.15 0.03 0.13 1.00 0.07
Cognitive Ability -0.14 -0.31 -0.06 0.03 0.07 1.00
p_cors_journal_intercept <- cors_journal_intercept |>
  column_to_rownames("outcome") |>
  ggcorrplot(method = "circle",
             #hc.order = TRUE,
             colors = c("#413E7EFF", "#DEF5E5FF", "#359EAAFF"),
             type = "full",
             outline.col = "grey20",
             ggtheme = ggplot2::theme_linedraw) + 
  ggtitle("Correlations among prevalences")

p_cors_journal_intercept 

quicksave("p_cors_journal_intercept", 7.5, 7.5)

Trend

What was correlation between the change in prevalences over time in the different modes of measurement? As one mode becomes more/less common, what happened for the others?

# wrangle
var_cors_journal_slope <- var_cors_journal |>
  filter(str_detect(var, "_year_centered")) |>
  select(var, contains("_year_centered") & contains("Estimate.")) |>
  mutate(var = str_remove(var, "_year_centered")) %>%
  rename_with(~ str_remove(., "Estimate.")) %>%
  rename_with(~ str_remove(., "_year_centered"))

# show_col(viridis::mako(25))
# viridis::mako(25)

# plot
cors_journal_slope <- var_cors_journal_slope |> 
  rename(outcome = var,
         "Direct Behavioral" = directbehavioral, 
         "Behavioral Proxy" = behavioralproxy, 
         "Self-Report about Behavior" = selfreportsaboutbehavior, 
         "Self-Report about Subjective States" = selfreportaboutsubjectivestate, 
         "Neuro/Bio/Psychophys" = neurobiopsychophys, 
         "Cognitive Ability" = cognitiveability) |>
  mutate(outcome = case_when(outcome == "directbehavioral" ~ "Direct Behavioral",       
                             outcome == "behavioralproxy" ~ "Behavioral Proxy",
                             outcome == "selfreportsaboutbehavior" ~ "Self-Report about Behavior",
                             outcome == "selfreportaboutsubjectivestate" ~ "Self-Report about Subjective States",
                             outcome == "neurobiopsychophys" ~ "Neuro/Bio/Psychophys",
                             outcome == "cognitiveability" ~ "Cognitive Ability")) 

cors_journal_slope |>
  mutate_if(is.numeric, rnd) |>
  write_csv("../../data/registered report/results/cors_journal_slope.csv")

# table
cors_journal_slope |>
  mutate_if(is.numeric, rnd) |>
  kable(caption = "Correlations among random effects for trend at the subfield level") |>
  kable_classic(full_width = FALSE)
Correlations among random effects for trend at the subfield level
outcome Direct Behavioral Behavioral Proxy Self-Report about Behavior Self-Report about Subjective States Neuro/Bio/Psychophys Cognitive Ability
Direct Behavioral 1.00 0.12 -0.09 0.11 0.05 0.48
Behavioral Proxy 0.12 1.00 -0.01 0.00 -0.10 0.13
Self-Report about Behavior -0.09 -0.01 1.00 -0.20 0.14 -0.21
Self-Report about Subjective States 0.11 0.00 -0.20 1.00 0.13 0.11
Neuro/Bio/Psychophys 0.05 -0.10 0.14 0.13 1.00 0.02
Cognitive Ability 0.48 0.13 -0.21 0.11 0.02 1.00
p_cors_journal_slope <- cors_journal_slope |>
  column_to_rownames("outcome") |>
  ggcorrplot(method = "circle",
             #hc.order = TRUE,
             colors = c("#413E7EFF", "#DEF5E5FF", "#359EAAFF"), 
             type = "full",
             outline.col = "grey20",
             ggtheme = ggplot2::theme_linedraw) + 
  ggtitle("Correlations among trends")

p_cors_journal_slope

quicksave("p_cors_journal_slope", 7.5, 7.5)

Watermark simulated data plots

library(grid)

watermark <- function(fontsize = 20){
  annotation_custom(
    grob = textGrob(label = "Simulated data",
                    gp = gpar(fontsize = fontsize, 
                              col = "red", 
                              alpha = 0.5), 
                    rot = 30),
    xmin = -Inf, xmax = Inf,
    ymin = -Inf, ymax = Inf
  )
}

Subfields

p_prevalence_subfields + watermark(10)

quicksave("p_prevalence_subfields_watermark", 11, 6)

p_trend_subfields + watermark(10)

quicksave("p_trend_subfields_watermark", 11, 6)

Journals

p_prevalence_journals + watermark(30)

quicksave("p_prevalence_journals_watermark", 12, 10)


p_trend_journals + watermark(30)

quicksave("p_trend_journals_watermark", 12, 10)

Correlations

p_cors_journal_intercept + watermark(30)

quicksave("p_cors_journal_intercept_watermark", 7.5, 7.5)


p_cors_journal_slope + watermark(30)

quicksave("p_cors_journal_slope_watermark", 7.5, 7.5)

Session info

sessionInfo()
## R version 4.3.3 (2024-02-29)
## Platform: aarch64-apple-darwin20 (64-bit)
## Running under: macOS Sonoma 14.5
## 
## Matrix products: default
## BLAS:   /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRblas.0.dylib 
## LAPACK: /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRlapack.dylib;  LAPACK version 3.11.0
## 
## locale:
## [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
## 
## time zone: Europe/Zurich
## tzcode source: internal
## 
## attached base packages:
## [1] grid      stats     graphics  grDevices utils     datasets  methods  
## [8] base     
## 
## other attached packages:
##  [1] kableExtra_1.4.0       knitr_1.48             marginaleffects_0.14.0
##  [4] emmeans_1.10.2         tidybayes_3.0.6        brms_2.21.0           
##  [7] Rcpp_1.0.12            ggcorrplot_0.1.4.1     ggstance_0.3.7        
## [10] scales_1.3.0           ggplot2_3.5.1          janitor_2.2.0         
## [13] readr_2.1.5            purrr_1.0.2            readxl_1.4.3          
## [16] forcats_1.0.0          stringr_1.5.1          tibble_3.2.1          
## [19] tidyr_1.3.1            dplyr_1.1.4           
## 
## loaded via a namespace (and not attached):
##  [1] gridExtra_2.3        inline_0.3.19        sandwich_3.1-0      
##  [4] rlang_1.1.4          magrittr_2.0.3       multcomp_1.4-25     
##  [7] snakecase_0.11.1     matrixStats_1.0.0    compiler_4.3.3      
## [10] mgcv_1.9-1           loo_2.6.0            reshape2_1.4.4      
## [13] systemfonts_1.0.6    vctrs_0.6.5          crayon_1.5.2        
## [16] pkgconfig_2.0.3      arrayhelpers_1.1-0   fastmap_1.1.1       
## [19] backports_1.4.1      labeling_0.4.3       utf8_1.2.4          
## [22] rmarkdown_2.26       tzdb_0.4.0           ragg_1.3.0          
## [25] bit_4.0.5            xfun_0.46            cachem_1.0.8        
## [28] jsonlite_1.8.8       collapse_2.0.13      highr_0.11          
## [31] parallel_4.3.3       R6_2.5.1             bslib_0.7.0         
## [34] stringi_1.8.4        StanHeaders_2.32.6   lubridate_1.9.3     
## [37] jquerylib_0.1.4      cellranger_1.1.0     estimability_1.5.1  
## [40] rstan_2.32.6         zoo_1.8-12           bayesplot_1.10.0    
## [43] Matrix_1.6-5         splines_4.3.3        timechange_0.3.0    
## [46] tidyselect_1.2.1     rstudioapi_0.16.0    abind_1.4-5         
## [49] yaml_2.3.8           codetools_0.2-20     curl_5.2.1          
## [52] pkgbuild_1.4.4       plyr_1.8.9           lattice_0.22-6      
## [55] withr_3.0.1          bridgesampling_1.1-2 posterior_1.4.1     
## [58] coda_0.19-4.1        evaluate_0.23        survival_3.5-8      
## [61] RcppParallel_5.1.7   xml2_1.3.6           ggdist_3.3.2        
## [64] pillar_1.9.0         tensorA_0.36.2       checkmate_2.3.1     
## [67] stats4_4.3.3         insight_0.19.10      distributional_0.4.0
## [70] generics_0.1.3       vroom_1.6.5          hms_1.1.3           
## [73] rstantools_2.4.0     munsell_0.5.1        xtable_1.8-4        
## [76] glue_1.7.0           tools_4.3.3          data.table_1.15.4   
## [79] mvtnorm_1.2-5        QuickJSR_1.1.3       colorspace_2.1-1    
## [82] nlme_3.1-164         cli_3.6.3            textshaping_0.3.7   
## [85] fansi_1.0.6          svUnit_1.0.6         viridisLite_0.4.2   
## [88] svglite_2.1.3        Brobdingnag_1.2-9    V8_4.3.3            
## [91] gtable_0.3.5         sass_0.4.9           digest_0.6.35       
## [94] TH.data_1.1-2        farver_2.1.2         htmltools_0.5.8.1   
## [97] lifecycle_1.0.4      bit64_4.0.5          MASS_7.3-60.0.1